:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --primary: #2563eb;
    --border: #e5e7eb;
    --card-bg: #f9fafb;
}

[data-theme="dark"] {
    --bg: #0f1115;
    --text: #e5e7eb;
    --primary: #3b82f6;
    --border: #2a2d34;
    --card-bg: #1a1d23;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    transition: background 0.2s, color 0.2s;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    letter-spacing: -0.01em;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.2s, background 0.2s;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
}

.main-nav a, .header-account-links a {
    color: var(--text);
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-utility-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-account-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle, .icon-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
}

.theme-toggle:hover, .icon-btn:hover {
    background: var(--border);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    margin: 0 auto;
    transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lang-switch {
    display: flex;
    gap: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}

.lang-pill {
    color: var(--text);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    opacity: 0.6;
}

.lang-pill.active {
    background: var(--primary);
    color: #fff !important;
    opacity: 1;
}

.btn-primary {
    background: var(--primary);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.btn-primary:hover {
    filter: brightness(0.92);
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

.auth-form {
    max-width: 400px;
    margin: 60px auto;
}

.auth-form input {
    width: 100%;
    padding: 10px;
    margin: 6px 0 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
}

/* ---------- Pro Auth Card (login/register/forgot/reset) ---------- */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 50px 16px 70px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 22px;
    color: var(--text);
}

.auth-logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 60%, transparent);
}

.auth-card h1 {
    font-size: 1.5rem;
    margin: 0 0 6px;
}

.auth-subtitle {
    color: #888;
    font-size: 0.88rem;
    margin: 0 0 22px;
}

.auth-card-form label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
    margin-top: 14px;
}

.auth-card-form label:first-of-type {
    margin-top: 0;
}

.auth-card-form input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
}

.auth-card-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
}

.auth-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.auth-row-between {
    justify-content: space-between;
    align-items: center;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #888;
    cursor: pointer;
}

.remember-checkbox input {
    width: auto;
    margin: 0;
}

/* ---------- Newsletter band ---------- */
.newsletter-band {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 30px 0;
}

.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.newsletter-inner h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.newsletter-inner p {
    margin: 0;
    color: #888;
    font-size: 0.88rem;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.newsletter-form input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    min-width: 220px;
}

/* ---------- Referral box ---------- */
.referral-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    max-width: 560px;
}

.referral-link-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.referral-link-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
}

.auth-link-muted {
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    margin-top: 20px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.auth-footer-line {
    text-align: center;
    margin-top: 22px;
    font-size: 0.88rem;
    color: #888;
}

.auth-footer-line a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero-pro {
    position: relative;
    padding: 70px 20px 60px;
    background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary) 15%, transparent), transparent 60%);
    border-radius: 0 0 24px 24px;
}

.hero-badge {
    display: inline-block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    margin-bottom: 18px;
    color: var(--primary);
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
}

.btn-outline:hover {
    background: var(--card-bg);
}

.hero-subtitle {
    color: #888;
    font-size: 1.1rem;
    margin: 12px 0 28px;
}

.btn-large {
    padding: 12px 28px;
    font-size: 1.05rem;
    border-radius: 8px;
}

.home-section {
    margin: 50px 0;
}

.home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.home-section-head h2 {
    margin: 0;
}

.view-all-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.pdf-card-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--border);
    border-radius: 6px;
    margin-bottom: 10px;
}

.pdf-card-category {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

/* ---------- Stats bar ---------- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 36px 0;
}

.stats-bar-item {
    background: var(--card-bg);
    text-align: center;
    padding: 20px 10px;
}

.stats-bar-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.stats-bar-label {
    font-size: 0.8rem;
    color: #888;
}

.stats-bar-icon {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 6px;
}

/* ---------- Trust / Niyə bizi seçin ---------- */
.trust-section {
    margin: 40px 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.trust-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.trust-item h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
}

.trust-item p {
    margin: 0;
    color: #888;
    font-size: 0.85rem;
}

/* ---------- Static pages (Haqqımızda, Şərtlər, Məxfilik, s.) ---------- */
.static-page {
    max-width: 760px;
    margin: 20px auto 60px;
    line-height: 1.75;
}

.static-page h1 {
    margin-bottom: 6px;
}

.static-page h2 {
    margin-top: 32px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.static-page ul {
    padding-left: 22px;
}

.static-page li {
    margin-bottom: 6px;
}

.static-page a {
    color: var(--primary);
}

/* ---------- FAQ accordion ---------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '+ ';
    color: var(--primary);
    font-weight: 700;
}

.faq-item[open] summary::before {
    content: '− ';
}

.faq-item p {
    margin: 10px 0 0;
    color: #888;
    line-height: 1.6;
}

/* ---------- Scroll reveal animasiyası ---------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Category chips ---------- */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    background: var(--card-bg);
    transition: border-color 0.15s, transform 0.15s;
}

.category-chip:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.category-chip-count {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 999px;
}

/* ---------- How it works ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.step-number {
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    margin: 0 auto 14px;
}

.step-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.step-card p {
    color: #888;
    font-size: 0.88rem;
    margin: 0;
}

/* ---------- PDF Grid & Card (əsas quruluş) ---------- */
.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pdf-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    background: var(--card-bg);
    height: 100%;
    box-sizing: border-box;
}

.pdf-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
    display: block;
}

/* ---------- Card hover polish ---------- */
.pdf-card, .blog-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pdf-card:hover, .blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

/* ---------- Footer ---------- */
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 30px;
    padding-top: 10px;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.footer-about {
    color: #888;
    font-size: 0.88rem;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 4px 0;
    font-size: 0.92rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 30px;
    padding: 18px 20px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.catalog-filter {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px 0 10px;
}

.catalog-search {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
}

.catalog-category {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
}

.clear-filter-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 36px 0;
}

.pagination-link {
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.pagination-link:hover {
    background: var(--card-bg);
}

.pagination-info {
    color: #888;
    font-size: 0.88rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 60px;
    color: #888;
    padding: 40px 0 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.blog-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    background: var(--card-bg);
}

.blog-card img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.blog-post .content {
    margin-top: 20px;
    line-height: 1.7;
}

.pdf-cover {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
}

.comments {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.comment {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    margin-bottom: 10px;
}

.comment-form label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 6px;
}

.comment-form input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    max-width: 140px;
    margin-bottom: 10px;
}

.purchase-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.purchase-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
}

.purchase-info h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.purchase-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
}

.purchase-price {
    color: var(--primary);
    font-weight: 700;
}

.pill-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
}

.pill-success { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.pill-warning { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.pill-danger  { background: rgba(239, 68, 68, 0.14); color: #dc2626; }

.purchase-action {
    flex-shrink: 0;
}

.purchase-waiting {
    color: #888;
}

.purchase-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.82rem;
    color: #888;
}

.purchase-pdf-password code {
    background: var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text);
    font-weight: 600;
}

.cert-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
}

/* ---------- Konfeti animasiyası ---------- */
.confetti-piece {
    position: fixed;
    top: -20px;
    width: 9px;
    height: 14px;
    z-index: 400;
    pointer-events: none;
    animation-name: confetti-fall;
    animation-timing-function: ease-in;
    animation-fill-mode: forwards;
    border-radius: 2px;
}

@keyframes confetti-fall {
    to {
        top: 100vh;
        transform: translateY(0) rotate(720deg);
        opacity: 0.3;
    }
}

/* ---------- Nailiyyət (badge) kartları ---------- */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.badge-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 14px;
    text-align: center;
    transition: transform 0.15s;
}

.badge-earned {
    border-color: var(--primary);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 15%, transparent);
}

.badge-earned:hover {
    transform: translateY(-3px);
}

.badge-locked {
    opacity: 0.5;
}

.badge-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.badge-title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.badge-desc {
    font-size: 0.78rem;
    color: #888;
}

/* ---------- Günün Materialı spotlight ---------- */
.spotlight-section {
    margin: 40px 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, #f59e0b 10%, transparent));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
}

.spotlight-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.spotlight-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.05rem;
}

.spotlight-countdown {
    font-size: 0.82rem;
    color: #888;
    font-family: 'Courier New', ui-monospace, monospace;
}

.spotlight-body {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.spotlight-body img, .spotlight-body .pdf-card-placeholder {
    width: 140px;
    height: 105px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.spotlight-info h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.spotlight-info p {
    color: #888;
    margin: 0 0 12px;
    font-size: 0.9rem;
}

/* ---------- Testimonials ---------- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}

.testimonial-stars {
    color: #f59e0b;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.testimonial-content {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 14px;
    font-style: italic;
}

.testimonial-author strong {
    display: block;
    font-size: 0.9rem;
}

.testimonial-author span {
    color: #888;
    font-size: 0.8rem;
}

/* ---------- Referral leaderboard ---------- */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    max-width: 480px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
}

.leaderboard-row.leaderboard-me {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.leaderboard-rank {
    font-weight: 800;
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
    color: #888;
}

.leaderboard-row:nth-child(1) .leaderboard-rank { color: #f59e0b; }
.leaderboard-row:nth-child(2) .leaderboard-rank { color: #94a3b8; }
.leaderboard-row:nth-child(3) .leaderboard-rank { color: #b45309; }

.leaderboard-name {
    flex: 1;
    font-size: 0.92rem;
}

.leaderboard-count {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

/* ---------- QR paylaşım qutusu ---------- */
.qr-box {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.qr-box img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    background: #fff;
}

.qr-box-text {
    font-size: 0.85rem;
    color: #888;
    max-width: 200px;
}

.qr-box-text a {
    color: var(--primary);
    display: inline-block;
    margin-top: 6px;
}

/* ---------- Paylaşım düymələri ---------- */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.85rem;
    color: #888;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff !important;
}

.share-whatsapp {
    background: #25d366;
}

.share-telegram {
    background: #0088cc;
}

.share-btn:hover {
    filter: brightness(0.92);
}

/* ---------- Flash Sale ---------- */
.flash-sale-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #dc2626, #f97316);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.flash-sale-price {
    color: #dc2626;
    font-weight: 700;
}

.flash-sale-original {
    text-decoration: line-through;
    color: #888;
    font-size: 0.85rem;
    margin-left: 6px;
}

.flash-sale-countdown {
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 700;
    margin-top: 4px;
}

/* ---------- PDF Card: rating + wishlist ---------- */
.pdf-card-wrap {
    position: relative;
}

.pdf-card-wishlist-form {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}

.pdf-card-wishlist-btn {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-card-rating {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 4px;
}

.pdf-card-rating span {
    color: #aaa;
}

/* ---------- PDF detail: wishlist + rating ---------- */
.pdf-detail-head {
    position: relative;
    display: inline-block;
}

.wishlist-form {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}

.wishlist-btn {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 14px;
}

.rating-text {
    color: #888;
    font-size: 0.9rem;
}

.coupon-row {
    margin-bottom: 12px;
}

.coupon-row input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    max-width: 260px;
}

/* ---------- Reviews section ---------- */
.reviews-section {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.review-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    margin: 16px 0 24px;
    max-width: 480px;
}

.review-form label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
}

.review-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    margin-top: 6px;
}

.star-select {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin-top: 6px;
}

.star-select input { display: none; }

.star-select label {
    font-size: 1.6rem;
    color: #d1d5db;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.star-select input:checked ~ label,
.star-select label:hover,
.star-select label:hover ~ label {
    color: #f59e0b;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.review-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}

.review-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.review-item p {
    margin: 6px 0;
}

/* ---------- PWA Install Banner ---------- */
.install-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.install-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.install-banner .btn-primary {
    background: #fff !important;
    color: var(--primary) !important;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
}

.install-dismiss {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.8;
}

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
    padding: 16px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-banner.visible {
    display: flex;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text);
    max-width: 640px;
}

.cookie-banner-actions {
    flex-shrink: 0;
}

.cookie-banner .btn-primary {
    padding: 8px 20px;
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cookie-banner-actions .btn-primary {
        width: 100%;
    }
}

/* ---------- Toast bildirişlər ---------- */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    padding: 0 16px;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left-color: #16a34a;
}

.toast-error {
    border-left-color: #dc2626;
}

/* ---------- Mobil alt naviqasiya paneli ---------- */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    body.has-bottom-nav {
        padding-bottom: 62px;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: color-mix(in srgb, var(--card-bg) 92%, transparent);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: #888;
        text-decoration: none;
        font-size: 0.68rem;
        padding: 4px 6px;
        border-radius: 8px;
        flex: 1;
        min-width: 0;
    }

    .mobile-bottom-nav a span:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mbn-icon {
        font-size: 1.2rem;
    }

    .mobile-bottom-nav a.active {
        color: var(--primary);
    }

    .cookie-banner {
        bottom: 62px;
    }
}

.account-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.account-tabs a {
    color: var(--text);
    text-decoration: none;
    padding: 10px 16px;
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
}

.account-tabs a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.admin-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.admin-form label {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
}

.admin-form input, .admin-form select, .admin-form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
}

.admin-form input:disabled {
    opacity: 0.6;
}

/* ==========================================
   MOBİL RESPONSİV (768px və aşağı)
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }

    .header-inner {
        padding: 12px 14px;
        position: relative;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-wrapper {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        position: absolute;
        top: calc(100% + 8px);
        left: 14px;
        right: 14px;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
        z-index: 50;
    }

    .nav-wrapper.open {
        display: flex;
        animation: navDrop 0.15s ease;
    }

    @keyframes navDrop {
        from { opacity: 0; transform: translateY(-6px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .main-nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: 100%;
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--border);
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        width: 100%;
    }

    .header-utility-row {
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border);
    }

    .header-account-links {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
    }

    .header-account-links a {
        margin-right: 0;
        padding: 9px 10px;
        width: 100%;
        border-radius: 8px;
        box-sizing: border-box;
    }

    .main-nav a {
        margin-right: 0;
        padding: 9px 10px;
        width: 100%;
        border-radius: 8px;
    }

    .main-nav a:hover, .header-account-links a:hover {
        background: var(--border);
    }

    .lang-switch {
        align-self: center;
    }

    .header-account-links .btn-primary {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .hero {
        padding: 50px 16px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .home-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .catalog-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-search, .catalog-category {
        width: 100%;
    }

    .admin-two-col {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .install-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .spotlight-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .spotlight-body img, .spotlight-body .pdf-card-placeholder {
        width: 100%;
        height: 160px;
    }

    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .qr-box {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        min-width: 0;
        width: 100%;
    }

    .auth-row-between {
        flex-wrap: wrap;
        gap: 10px;
    }

    .install-banner-actions {
        width: 100%;
        justify-content: space-between;
    }

    .account-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .purchase-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .purchase-action {
        width: 100%;
    }

    .purchase-action .btn-primary {
        display: block;
        text-align: center;
    }

    .auth-form {
        margin: 30px auto;
        padding: 0 4px;
    }

    .auth-wrap {
        padding: 24px 12px 50px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .pdf-grid, .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .pdf-detail, .blog-post {
        padding: 0 2px;
    }

    .pdf-cover {
        max-width: 100%;
    }

    table:not(.orders-table) {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ---------- Changelog ---------- */
.changelog-list {
    margin-top: 24px;
    border-left: 2px solid var(--border);
    padding-left: 24px;
}

.changelog-item {
    position: relative;
    margin-bottom: 28px;
}

.changelog-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.changelog-date {
    font-size: 0.78rem;
    color: #888;
    font-family: 'Courier New', ui-monospace, monospace;
    margin-bottom: 4px;
}

.changelog-body h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.changelog-body p {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==========================================
   ÇAP (PRINT) STİLİ
   ========================================== */
@media print {
    .site-header, .mobile-bottom-nav, .install-banner, .cookie-banner,
    .newsletter-band, .site-footer, .toast-container, .theme-toggle,
    .menu-toggle, .lang-switch, .btn-primary, .btn-outline, .cert-link,
    .qr-box, .share-buttons, .wishlist-form, .wishlist-btn,
    .pdf-card-wishlist-form, .admin-layout, .install-dismiss {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    a {
        color: #000 !important;
        text-decoration: underline;
    }

    .pdf-detail, .blog-post, .static-page {
        padding: 0 !important;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    @page {
        margin: 2cm;
    }
}

/* ---------- Quiz ---------- */
.quiz-form {
    margin-top: 20px;
}

.quiz-question {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    text-align: left;
}

.quiz-question h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: normal;
    cursor: pointer;
}

.quiz-option:hover {
    background: var(--border);
}

.quiz-option input {
    width: auto;
}

/* ---------- Abunəlik planları ---------- */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.plan-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.plan-card h3 {
    margin: 0 0 10px;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

.plan-duration {
    color: #888;
    font-size: 0.85rem;
    margin: 2px 0 14px;
}

.plan-desc {
    color: #888;
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
    font-size: 0.88rem;
    color: var(--text);
    flex: 1;
}

.plan-features li {
    padding: 5px 0;
}

/* ---------- Bildiriş Mərkəzi ---------- */
.notif-bell {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    z-index: 150;
}

.notif-dropdown.open {
    display: block;
}

.notif-dropdown-head {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.notif-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item.unread {
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.notif-item-title {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 3px;
}

.notif-item-msg {
    font-size: 0.8rem;
    color: #888;
}

.notif-item-time {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 4px;
}

.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed;
        top: auto;
        bottom: 62px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}
