/**
 * WPRaffle Theme — components.css
 * Reusable component styles: top bar, header/nav, hero, cards, carousels,
 * charity block, instant-payouts block, footer.
 */

/* ================================================================== *
 * TOP BAR
 * ================================================================== */
.wpr-topbar {
	background: var(--wpr-dark);
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.85rem;
	min-height: var(--wpr-topbar-h);
	display: flex;
	align-items: center;
}
.wpr-topbar a { color: #fff; }
.wpr-topbar a:hover { color: var(--wpr-accent); }
.wpr-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
}
.wpr-topbar__msg {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 500;
}
.wpr-topbar__msg i { color: var(--wpr-success); }
.wpr-topbar__nav { display: flex; align-items: center; gap: 1.25rem; }
.wpr-topbar__nav a { font-weight: 500; }
.wpr-topbar__social a { margin-left: 0.75rem; font-size: 0.95rem; }
@media (max-width: 767.98px) {
	.wpr-topbar__nav { display: none; }
	.wpr-topbar__social { display: none; }
}

/* ================================================================== *
 * HEADER
 * ================================================================== */
.wpr-header {
	background: #fff;
	border-bottom: 1px solid var(--wpr-border);
	position: sticky;
	top: 0;
	z-index: 1030;
	box-shadow: var(--wpr-shadow-sm);
}
.wpr-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: var(--wpr-header-h);
}
.wpr-header__left { display: flex; align-items: center; gap: 1rem; flex: 0 0 auto; }

/* Logo */
.wpr-logo { display: inline-flex; flex-direction: column; line-height: 1.1; }
.wpr-logo .custom-logo { max-height: 56px; width: auto; }
.wpr-logo__text {
	font-family: var(--wpr-font-head);
	font-weight: 800;
	font-size: 1.6rem;
	color: var(--wpr-dark);
	letter-spacing: -0.01em;
}
.wpr-logo__tagline {
	font-size: 0.72rem;
	font-weight: 500;
	color: var(--wpr-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

/* Primary nav */
.wpr-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.wpr-nav ul {
	list-style: none;
	display: flex;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
}
.wpr-nav li { position: relative; }
.wpr-nav a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--wpr-dark);
	padding: 0.5rem 0;
	position: relative;
}
.wpr-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--wpr-accent);
	transition: width var(--wpr-transition);
}
.wpr-nav a:hover::after,
.wpr-nav .current-menu-item > a::after { width: 100%; }

/* Dropdown */
.wpr-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--wpr-border);
	border-radius: var(--wpr-radius);
	box-shadow: var(--wpr-shadow);
	padding: 0.5rem;
	flex-direction: column;
	gap: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all var(--wpr-transition);
}
.wpr-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.wpr-nav .sub-menu a { padding: 0.5rem 0.75rem; width: 100%; }
.wpr-nav .sub-menu a::after { display: none; }

/* Header actions (search, account, cart) */
.wpr-header__actions { display: flex; align-items: center; gap: 1rem; flex: 0 0 auto; }
.wpr-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: var(--wpr-dark);
	font-size: 1.1rem;
	transition: all var(--wpr-transition);
}
.wpr-icon-btn:hover { background: var(--wpr-light); color: var(--wpr-accent); }

/* Account link carries an optional text label next to the icon. */
.wpr-account.wpr-icon-btn { width: auto; padding: 0 0.85rem; gap: 0.45rem; font-size: 0.9rem; font-weight: 600; color: var(--wpr-dark); }
.wpr-account.wpr-icon-btn:hover { color: var(--wpr-accent); }
.wpr-cart.wpr-icon-btn { text-decoration: none; }
.wpr-cart-count {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 50%;
	background: var(--wpr-accent);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* Mobile toggle */
.wpr-menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	font-size: 1.4rem;
	color: var(--wpr-dark);
	cursor: pointer;
}
@media (max-width: 991.98px) {
	.wpr-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.wpr-nav { display: none; }
	.wpr-nav.is-open {
		display: block;
		position: fixed;
		inset: 0;
		background: #fff;
		z-index: 1040;
		padding: calc(var(--wpr-header-h) + 1rem) 1.5rem 2rem;
		overflow-y: auto;
	}
	.wpr-nav.is-open ul { flex-direction: column; gap: 0; }
	.wpr-nav.is-open a { padding: 1rem 0; border-bottom: 1px solid var(--wpr-border); font-size: 1.1rem; }
	.wpr-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 1rem; }
	.wpr-header__actions .wpr-account span { display: none; }
}

/* ================================================================== *
 * HERO
 * ================================================================== */
.wpr-hero {
	position: relative;
	color: #fff;
	overflow: hidden;
	background: var(--wpr-dark);
}
.wpr-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.45;
}
.wpr-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(var(--wpr-dark-rgb), 0.92) 0%, rgba(var(--wpr-dark-rgb), 0.55) 60%, rgba(var(--wpr-dark-rgb), 0.2) 100%);
}
.wpr-hero__inner {
	position: relative;
	z-index: 2;
	padding: 5.5rem 0;
	max-width: 720px;
}
.wpr-hero__title {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
	font-weight: 800;
	margin-bottom: 1rem;
	color: #fff;
}
.wpr-hero__title .accent { color: var(--wpr-accent); }
.wpr-hero__lead {
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 2rem;
}
.wpr-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.wpr-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 2.5rem;
	margin-top: 3rem;
}
.wpr-hero__stat .num {
	font-size: 2rem;
	font-weight: 800;
	color: #fff;
	line-height: 1;
}
.wpr-hero__stat .label {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.7);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-top: 0.25rem;
}
@media (max-width: 767.98px) {
	.wpr-hero__inner { padding: 3.5rem 0; }
	.wpr-hero__stats { gap: 1.5rem; }
}

/* ================================================================== *
 * SECTION HEADING
 * ================================================================== */
.wpr-section-heading__title {
	font-size: clamp(1.6rem, 3vw, 2.25rem);
	margin-bottom: 0.25rem;
}
.wpr-section-heading__subtitle { color: var(--wpr-muted); }
.wpr-section-heading__link {
	font-weight: 600;
	color: var(--wpr-accent);
	display: inline-flex;
	align-items: center;
}
.wpr-section-heading__link:hover { color: var(--wpr-accent-dark); }

/* ================================================================== *
 * COMPETITION / RAFFLE CARD
 * The plugin renders raffle products with .raffle-product-card; this styles
 * the theme-owned wrappers and the winners carousel cards.
 * ================================================================== */
.wpr-card {
	background: #fff;
	border: 1px solid var(--wpr-border);
	border-radius: var(--wpr-radius-lg);
	overflow: hidden;
	box-shadow: var(--wpr-shadow-sm);
	transition: transform var(--wpr-transition), box-shadow var(--wpr-transition);
	height: 100%;
	display: flex;
	flex-direction: column;
}
.wpr-card:hover { transform: translateY(-4px); box-shadow: var(--wpr-shadow); }
.wpr-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--wpr-light);
	overflow: hidden;
}
.wpr-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.wpr-card:hover .wpr-card__media img { transform: scale(1.04); }
.wpr-card__badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	padding: 0.3rem 0.75rem;
	border-radius: var(--wpr-radius-pill);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
}
.wpr-card__badge--live { background: var(--wpr-success); }
.wpr-card__badge--ending { background: var(--wpr-warning); color: var(--wpr-dark); }
.wpr-card__badge--ended { background: var(--wpr-muted); }

.wpr-card__body { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1 1 auto; }
.wpr-card__title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0;
	color: var(--wpr-dark);
}
.wpr-card__title a { color: inherit; }
.wpr-card__title a:hover { color: var(--wpr-accent); }
.wpr-card__meta { font-size: 0.85rem; color: var(--wpr-muted); }
.wpr-card__price {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--wpr-accent);
}
.wpr-card__footer { margin-top: auto; padding-top: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

/* ================================================================== *
 * WINNER CARD (carousel)
 * ================================================================== */
.wpr-winner-card {
	background: #fff;
	border: 1px solid var(--wpr-border);
	border-radius: var(--wpr-radius-lg);
	overflow: hidden;
	box-shadow: var(--wpr-shadow-sm);
	text-align: center;
	height: 100%;
}
.wpr-winner-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--wpr-light);
}
.wpr-winner-card__media img { width: 100%; height: 100%; object-fit: cover; }
.wpr-winner-badge {
	position: absolute;
	bottom: 0.75rem;
	left: 50%;
	transform: translateX(-50%);
	padding: 0.3rem 0.9rem;
	border-radius: var(--wpr-radius-pill);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	white-space: nowrap;
}
.wpr-winner-badge.badge-main { background: var(--wpr-accent); }
.wpr-winner-badge.badge-instant { background: var(--wpr-accent-2); }
.wpr-winner-card__body { padding: 1rem; }
.wpr-winner-card__name { font-weight: 700; margin: 0; color: var(--wpr-dark); }
.wpr-winner-card__prize { font-size: 0.9rem; color: var(--wpr-muted); margin: 0.15rem 0 0; }
.wpr-winner-card__quote { font-size: 0.82rem; font-style: italic; color: var(--wpr-gray-dark, #5a5b5d); margin: 0.4rem 0 0; line-height: 1.4; }
.wpr-winner-card__number { font-size: 0.8rem; color: var(--wpr-accent); font-weight: 600; margin-top: 0.4rem; }
.wpr-winner-card__date { font-size: 0.75rem; color: var(--wpr-muted); margin-top: 0.35rem; }

/* ================================================================== *
 * CAROUSELS (Swiper)
 * ================================================================== */
.wpr-swiper { padding: 0.5rem 0.5rem 2rem; }
.wpr-swiper .swiper-button-next,
.wpr-swiper .swiper-button-prev {
	width: 44px;
	height: 44px;
	background: #fff;
	border: 1px solid var(--wpr-border);
	border-radius: 50%;
	color: var(--wpr-dark);
	box-shadow: var(--wpr-shadow-sm);
	transition: all var(--wpr-transition);
}
.wpr-swiper .swiper-button-next::after,
.wpr-swiper .swiper-button-prev::after { font-size: 1rem; font-weight: 700; }
.wpr-swiper .swiper-button-next:hover,
.wpr-swiper .swiper-button-prev:hover { background: var(--wpr-accent); color: #fff; border-color: var(--wpr-accent); }
.wpr-swiper .swiper-pagination-bullet-active { background: var(--wpr-accent); }

/* ================================================================== *
 * CHARITY DONATIONS
 * ================================================================== */
.wpr-charity {
	background: linear-gradient(135deg, var(--wpr-accent) 0%, var(--wpr-accent-dark) 100%);
	color: #fff;
	border-radius: var(--wpr-radius-lg);
	padding: 3rem;
	text-align: center;
}
.wpr-charity__total {
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 800;
	line-height: 1;
	margin-bottom: 0.5rem;
}
.wpr-charity__label {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.9;
}
.wpr-charity__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	margin-top: 2.5rem;
	text-align: left;
}
.wpr-charity__card {
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--wpr-radius);
	padding: 1.5rem;
	backdrop-filter: blur(4px);
}
.wpr-charity__card h3 { color: #fff; font-size: 1.1rem; margin: 0 0 0.35rem; }
.wpr-charity__card p { margin: 0; opacity: 0.85; font-size: 0.9rem; }
@media (max-width: 767.98px) {
	.wpr-charity { padding: 2rem 1.25rem; }
}

/* ================================================================== *
 * INSTANT PAYOUTS / TRUST BLOCK
 * ================================================================== */
.wpr-trust {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
}
.wpr-trust__item {
	text-align: center;
	padding: 2rem 1.5rem;
	border-radius: var(--wpr-radius-lg);
	background: #fff;
	border: 1px solid var(--wpr-border);
	box-shadow: var(--wpr-shadow-sm);
}
.wpr-trust__icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	margin-bottom: 1rem;
}
.wpr-trust__icon--secure { background: rgba(var(--wpr-accent-rgb), 0.12); color: var(--wpr-accent); }
.wpr-trust__icon--free { background: rgba(99, 221, 146, 0.15); color: var(--wpr-success); }
.wpr-trust__icon--verified { background: rgba(var(--wpr-accent-2-rgb), 0.12); color: var(--wpr-accent-2); }
.wpr-trust__item h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.wpr-trust__item p { margin: 0; color: var(--wpr-muted); font-size: 0.9rem; }

/* ================================================================== *
 * FOOTER
 * ================================================================== */
.wpr-footer {
	background: var(--wpr-dark);
	color: rgba(255, 255, 255, 0.75);
	padding-top: 4rem;
	margin-top: auto;
}
.wpr-footer a { color: rgba(255, 255, 255, 0.75); }
.wpr-footer a:hover { color: var(--wpr-accent); }
.wpr-footer__top {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: 2.5rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.wpr-footer__brand .wpr-logo__text { color: #fff; }
.wpr-footer__brand p { margin-top: 1rem; font-size: 0.9rem; max-width: 320px; }
.wpr-footer h3.footer-widget-title,
.wpr-footer h2.footer-widget-title {
	color: #fff;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 1rem;
}
.wpr-footer ul { list-style: none; padding: 0; margin: 0; }
.wpr-footer ul li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.wpr-footer__social { margin-top: 1rem; display: flex; gap: 0.75rem; }
.wpr-footer__social a {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.wpr-footer__social a:hover { background: var(--wpr-accent); color: #fff; }
.wpr-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 1.5rem 0;
	font-size: 0.85rem;
}
.wpr-footer__payments { display: flex; align-items: center; gap: 0.75rem; opacity: 0.7; font-size: 1.5rem; }
@media (max-width: 991.98px) {
	.wpr-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
	.wpr-footer__top { grid-template-columns: 1fr; }
	.wpr-footer__bottom { justify-content: center; text-align: center; }
}

/* ================================================================== *
 * PAGINATION
 * ================================================================== */
.wpr-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.wpr-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.75rem;
	border-radius: var(--wpr-radius);
	border: 1px solid var(--wpr-border);
	color: var(--wpr-dark);
	font-weight: 600;
}
.wpr-pagination .page-numbers.current,
.wpr-pagination .page-numbers:hover { background: var(--wpr-accent); color: #fff; border-color: var(--wpr-accent); }
