/*
Theme Name: HepsineGel Fırsat
Theme URI: https://www.hepsinegel.com/
Author: HepsineGel
Description: Satış ortaklığı (affiliate) fırsat ve kupon sitesi teması. Fırsatlar, kupon kodları, tıklama takibi ve fiyat alarmı formu içerir.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: hepsinegel-firsat
*/

:root {
	--hgf-green: #08382F;
	--hgf-green-2: #0B5446;
	--hgf-ink: #10231E;
	--hgf-ink-2: #2E3F3A;
	--hgf-muted: #4A5A55;
	--hgf-muted-2: #5B6B66;
	--hgf-ground: #F4F5F1;
	--hgf-card: #FFFFFF;
	--hgf-line: #CBD3CF;
	--hgf-tile: #E9EFEC;
	--hgf-yellow: #F5B83D;
	--hgf-red: #B23A0B;
	--hgf-display: 'Bricolage Grotesque', system-ui, sans-serif;
	--hgf-body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--hgf-shadow: 0 1px 2px rgba(16, 35, 30, .06);
	--hgf-shadow-lg: 0 1px 2px rgba(16, 35, 30, .06), 0 12px 32px rgba(16, 35, 30, .08);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--hgf-ground); color: var(--hgf-ink); font-family: var(--hgf-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--hgf-green); }
a:hover { color: var(--hgf-green-2); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hgf-hp { position: absolute; left: -9999px; }
:focus-visible { outline: 3px solid var(--hgf-yellow); outline-offset: 2px; }

.hgf-wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { .hgf-wrap { padding-left: 16px; padding-right: 16px; } }

/* Butonlar */
.hgf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: none; font-family: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .1s ease, background-color .15s ease; }
.hgf-btn:active { transform: translateY(1px); }
.hgf-btn--dark { background: var(--hgf-green); color: #fff; }
.hgf-btn--dark:hover { background: var(--hgf-green-2); color: #fff; }
.hgf-btn--yellow { background: var(--hgf-yellow); color: var(--hgf-green); font-weight: 700; }
.hgf-btn--yellow:hover { background: #F0A91C; color: var(--hgf-green); }
.hgf-btn--light { background: #fff; color: var(--hgf-green); border: 1.5px solid var(--hgf-line); }
.hgf-btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }
.hgf-btn--ghost:hover { color: #fff; border-color: #fff; }
.hgf-btn--lg { min-height: 48px; padding: 0 20px; border-radius: 12px; }
.hgf-btn--block { display: flex; width: 100%; }

/* Üst bar */
.hgf-header { background: var(--hgf-green); color: #fff; }
.hgf-header__top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 16px; padding-bottom: 16px; }
.hgf-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.hgf-logo:hover { color: #fff; }
.hgf-logo__name { font-family: var(--hgf-display); font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.hgf-logo__accent { color: var(--hgf-yellow); }
.hgf-logo__icon { flex: none; display: block; }
@media (max-width: 760px) { .hgf-logo__icon { width: 34px; height: 34px; } }
.hgf-logo img { max-height: 44px; width: auto; }
.hgf-search { flex: 1 1 320px; display: flex; min-width: 0; }
.hgf-search input { flex: 1; min-width: 0; height: 44px; border: none; border-radius: 10px 0 0 10px; padding: 0 16px; font-size: 15px; font-family: inherit; color: var(--hgf-ink); }
.hgf-search button { height: 44px; width: 52px; border: none; border-radius: 0 10px 10px 0; background: var(--hgf-yellow); color: var(--hgf-green); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hgf-nav { padding-bottom: 14px; }
.hgf-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; font-weight: 500; }
.hgf-nav a { color: #fff; text-decoration: none; display: inline-block; padding: 4px 0; }
.hgf-nav a:hover { color: var(--hgf-yellow); }
.hgf-nav .hgf-nav__accent a { color: var(--hgf-yellow); font-weight: 700; }

/* Yapışkan üst menü */
.hgf-header { position: sticky; top: 0; z-index: 100; transition: box-shadow .2s ease; }
.admin-bar .hgf-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .hgf-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .hgf-header { top: 0; } }
.hgf-header__top, .hgf-nav { transition: padding .2s ease; }
.hgf-header.is-scrolled { box-shadow: 0 6px 20px rgba(16, 35, 30, .18); }
.hgf-header.is-scrolled .hgf-header__top { padding-top: 10px; padding-bottom: 10px; }
.hgf-header.is-scrolled .hgf-nav { padding-bottom: 8px; }

/* Telefonda: kategori menüsü tek satır, yana kaydırılır; kaydırınca bildirim butonu gizlenir */
@media (max-width: 760px) {
	.hgf-header__top { gap: 10px 12px; padding-top: 12px; padding-bottom: 12px; }
	.hgf-logo__name { font-size: 22px; }
	.hgf-header__top > .hgf-btn--ghost { flex: 1 1 100%; }
	.hgf-header.is-scrolled .hgf-header__top > .hgf-btn--ghost { display: none; }
	.hgf-header.is-scrolled .hgf-logo { display: none; }
	.hgf-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.hgf-nav::-webkit-scrollbar { display: none; }
	.hgf-nav ul { flex-wrap: nowrap; white-space: nowrap; gap: 18px; }
}

/* Yukarı çık butonu */
.hgf-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--hgf-green); color: #fff; box-shadow: 0 6px 20px rgba(16, 35, 30, .25); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.hgf-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.hgf-top:hover { background: var(--hgf-green-2); }
@media (max-width: 600px) { .hgf-top { right: 16px; bottom: 16px; } }
[id] { scroll-margin-top: 150px; }

/* Hero */
.hgf-hero { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; padding-top: 48px; padding-bottom: 32px; }
.hgf-hero__text { flex: 1 1 520px; min-width: 0; }
.hgf-hero__kicker { margin: 0 0 12px; font-weight: 600; font-size: 14px; color: var(--hgf-green-2); }
.hgf-hero h1 { margin: 0; font-family: var(--hgf-display); font-weight: 800; font-size: clamp(34px, 5vw, 52px); line-height: 1.04; letter-spacing: -1.5px; }
.hgf-hero__lead { margin: 16px 0 0; font-size: 18px; color: var(--hgf-muted); max-width: 560px; }
.hgf-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Günün fırsatı */
.hgf-today { flex: 1 1 340px; max-width: 420px; background: var(--hgf-card); border-radius: 20px; padding: 24px; box-shadow: var(--hgf-shadow-lg); }
.hgf-today__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hgf-today__label { font-weight: 700; font-size: 13px; color: var(--hgf-red); display: flex; align-items: center; gap: 6px; }
.hgf-today__timer { font-size: 13px; color: var(--hgf-muted-2); font-variant-numeric: tabular-nums; }
.hgf-today__img { margin-top: 16px; height: 200px; border-radius: 14px; background: var(--hgf-tile); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hgf-today__img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.hgf-today__store { margin: 16px 0 4px; font-size: 13px; color: var(--hgf-muted-2); font-weight: 500; }
.hgf-today h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; }
.hgf-today h2 a { color: inherit; text-decoration: none; }
.hgf-today .hgf-btn { margin-top: 16px; }

/* Fiyat satırı */
.hgf-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; }
.hgf-price__now { font-family: var(--hgf-display); font-weight: 800; font-size: 22px; color: var(--hgf-green); }
.hgf-today .hgf-price__now { font-size: 30px; }
.hgf-price__old { font-size: 14px; color: var(--hgf-muted-2); text-decoration: line-through; }
.hgf-badge { background: var(--hgf-red); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 8px; border-radius: 6px; line-height: 1.2; }
.hgf-today .hgf-badge { margin-left: auto; }
.hgf-lowest { margin: 8px 0 0; font-size: 12px; color: var(--hgf-green-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }

/* Bölüm başlığı + sıralama */
.hgf-section { padding-top: 56px; }
.hgf-section--first { padding-top: 8px; }
.hgf-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hgf-h2 { margin: 0; font-family: var(--hgf-display); font-weight: 800; font-size: 30px; letter-spacing: -.5px; }
.hgf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hgf-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--hgf-line); background: #fff; color: var(--hgf-ink); font-weight: 500; font-size: 14px; text-decoration: none; }
.hgf-chip:hover { border-color: var(--hgf-green); color: var(--hgf-ink); }
.hgf-chip.is-active { background: var(--hgf-green); border-color: var(--hgf-green); color: #fff; font-weight: 600; }
.hgf-more { margin-top: 24px; text-align: center; }

/* Fırsat kartları */
.hgf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 24px; }
@media (max-width: 560px) { .hgf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.hgf-card { background: var(--hgf-card); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--hgf-shadow); min-width: 0; }
@media (max-width: 560px) { .hgf-card { padding: 12px; } .hgf-card .hgf-price__now { font-size: 18px; } }
.hgf-card__img { text-decoration: none; position: relative; aspect-ratio: 16 / 10; border-radius: 12px; background: var(--hgf-tile); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--hgf-muted); font-size: 13px; }
.hgf-card__img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.hgf-card__img .hgf-badge { position: absolute; top: 10px; left: 10px; }
.hgf-card__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--hgf-muted-2); font-weight: 500; }
.hgf-card h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.hgf-card h3 a { color: inherit; text-decoration: none; }
.hgf-card h3 a:hover { color: var(--hgf-green-2); }
.hgf-card .hgf-price { margin-top: 0; }
.hgf-card .hgf-btn { margin-top: auto; }
.hgf-card--expired { opacity: .6; }

/* Kuponlar */
.hgf-coupons { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.hgf-coupon { background: var(--hgf-card); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; border: 1.5px dashed #9FB3AB; }
.hgf-coupon__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hgf-coupon__store { font-weight: 700; font-size: 15px; }
.hgf-coupon__until { font-size: 12px; color: var(--hgf-muted-2); }
.hgf-coupon__desc { margin: 0; font-size: 15px; line-height: 1.4; color: var(--hgf-ink-2); }
.hgf-coupon__row { display: flex; gap: 8px; }
.hgf-coupon__code { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--hgf-ground); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 16px; letter-spacing: 1px; overflow-wrap: anywhere; }
.hgf-coupon__link { font-size: 14px; font-weight: 600; }

/* Nasıl çalışır */
.hgf-steps { background: var(--hgf-green); color: #fff; border-radius: 24px; padding: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
@media (max-width: 600px) { .hgf-steps { padding: 28px 20px; } }
.hgf-steps .hgf-steps__n { margin: 0; font-family: var(--hgf-display); font-weight: 800; font-size: 36px; color: var(--hgf-yellow); line-height: 1; }
.hgf-steps h3 { margin: 10px 0 6px; font-size: 18px; font-weight: 700; }
.hgf-steps p { margin: 0; font-size: 15px; color: #D3E0DB; }

/* Fiyat alarmı */
.hgf-alert { background: var(--hgf-card); border-radius: 24px; padding: 32px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px; }
@media (max-width: 600px) { .hgf-alert { padding: 24px 18px; } }
.hgf-alert__text { flex: 1 1 340px; min-width: 0; }
.hgf-alert__text h2 { margin: 0; font-family: var(--hgf-display); font-weight: 800; font-size: 26px; }
.hgf-alert__text p { margin: 8px 0 0; font-size: 15px; color: var(--hgf-muted); }
.hgf-alert-form { flex: 1 1 460px; display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.hgf-input { flex: 1 1 130px; min-width: 0; height: 48px; border: 1.5px solid var(--hgf-line); border-radius: 10px; padding: 0 14px; font-size: 15px; font-family: inherit; background: #fff; color: var(--hgf-ink); }
.hgf-input--wide { flex: 2 1 220px; }
.hgf-input:focus { border-color: var(--hgf-green); outline: none; box-shadow: 0 0 0 3px rgba(8, 56, 47, .15); }
.hgf-alert-form .hgf-btn { min-height: 48px; }
.hgf-consent { flex-basis: 100%; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--hgf-muted); }
.hgf-consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.hgf-notice { flex-basis: 100%; margin: 0 0 8px; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.hgf-notice--ok { background: #E3F1EA; color: #0B5446; }
.hgf-notice--err { background: #FBE9E2; color: #8A2C08; }

/* Tekil fırsat */
.hgf-single { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-top: 40px; align-items: start; }
@media (max-width: 860px) { .hgf-single { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; } }
.hgf-single__img { background: #fff; border-radius: 20px; overflow: hidden; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; color: var(--hgf-muted); box-shadow: var(--hgf-shadow); }
.hgf-single__img img { width: 100%; height: 100%; object-fit: contain; }
.hgf-single__box { background: #fff; border-radius: 20px; padding: 28px; box-shadow: var(--hgf-shadow); }
.hgf-single h1 { margin: 8px 0 0; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.5px; }
.hgf-single .hgf-price__now { font-size: 36px; }
.hgf-single__content { margin-top: 20px; color: var(--hgf-ink-2); }
.hgf-single__note { margin-top: 16px; font-size: 13px; color: var(--hgf-muted-2); }
.hgf-crumbs { font-size: 13px; color: var(--hgf-muted-2); padding-top: 24px; }
.hgf-crumbs a { color: var(--hgf-muted-2); }

/* Boş durum, sayfalama, sayfa içeriği */
.hgf-empty { background: #fff; border-radius: 16px; padding: 40px 24px; text-align: center; color: var(--hgf-muted); margin-top: 24px; }
.hgf-empty h2 { margin: 0 0 8px; color: var(--hgf-ink); font-size: 20px; }
.hgf-pagination { margin-top: 32px; display: flex; justify-content: center; }
.hgf-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.hgf-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 10px; background: #fff; color: var(--hgf-ink); text-decoration: none; font-weight: 600; border: 1.5px solid var(--hgf-line); }
.hgf-pagination .page-numbers.current { background: var(--hgf-green); color: #fff; border-color: var(--hgf-green); }
.hgf-page { background: #fff; border-radius: 20px; padding: 32px; margin-top: 32px; box-shadow: var(--hgf-shadow); }
.hgf-page h1 { margin-top: 0; font-family: var(--hgf-display); font-weight: 800; font-size: 34px; }

/* Footer */
.hgf-footer { padding-top: 56px; padding-bottom: 40px; }
.hgf-footer__inner { border-top: 1px solid var(--hgf-line); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--hgf-muted-2); }
.hgf-footer__inner p { margin: 0; max-width: 640px; }
.hgf-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.hgf-footer a { color: var(--hgf-muted-2); }
.hgf-footer a:hover { color: var(--hgf-green); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
