/*
Theme Name: Niche Affiliate
Theme URI:
Description: A clean, modern WordPress theme designed for Amazon niche affiliate sites. Works seamlessly with the Amazon Niche Affiliate plugin. Built with Tailwind CSS.
Version: 1.0.0
Author: Sitebinary
Author URI: https://sitebinary.com
License: GNU General Public License v2 or later
Text Domain: niche-affiliate
*/

/* ── Post / Page Content Typography ────────────────────────────────── */

.prose {
    color: #374151;
    font-size: 16px;
    line-height: 1.75;
    word-wrap: break-word;
}

/* Headings */
.prose h1 {
    font-size: 2.25em;
    margin-top: 0;
    margin-bottom: 0.8em;
    line-height: 1.15;
    font-weight: 800;
    color: #111827;
}

.prose h2 {
    font-size: 1.65em;
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.25;
    font-weight: 700;
    color: #111827;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #e5e7eb;
}

.prose h3 {
    font-size: 1.35em;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    line-height: 1.3;
    font-weight: 700;
    color: #1f2937;
}

.prose h4 {
    font-size: 1.15em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.4;
    font-weight: 700;
    color: #1f2937;
}

.prose h5 {
    font-size: 1em;
    margin-top: 1.4em;
    margin-bottom: 0.4em;
    font-weight: 700;
    color: #374151;
}

.prose h6 {
    font-size: 0.9em;
    margin-top: 1.3em;
    margin-bottom: 0.4em;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paragraphs */
.prose p {
    margin-top: 0;
    margin-bottom: 1.25em;
}

.prose p:first-child {
    margin-top: 0;
}

/* Links */
.prose a {
    color: var(--anafp-primary, #667eea);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: color-mix(in srgb, var(--anafp-primary, #667eea) 30%, transparent);
    transition: text-decoration-color 0.15s;
}

.prose a:hover {
    text-decoration-color: var(--anafp-primary, #667eea);
}

/* Lists */
.prose ul {
    list-style-type: disc;
    margin-top: 0;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ol {
    list-style-type: decimal;
    margin-top: 0;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

.prose li > ul,
.prose li > ol {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

/* Blockquote */
.prose blockquote {
    border-left: 4px solid var(--anafp-primary, #667eea);
    background: #f9fafb;
    padding: 0.75em 1.25em;
    margin: 1.5em 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4b5563;
}

.prose blockquote p {
    margin-bottom: 0;
}

/* Strong / Em */
.prose strong {
    font-weight: 700;
    color: #111827;
}

.prose em {
    font-style: italic;
}

/* Inline code */
.prose code {
    background: #f3f4f6;
    color: #dc2626;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

.prose pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1em 1.25em;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.875em;
    line-height: 1.7;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9em;
}

.prose thead {
    border-bottom: 2px solid #e5e7eb;
}

.prose th {
    font-weight: 700;
    text-align: left;
    padding: 0.6em 0.8em;
    color: #374151;
}

.prose td {
    padding: 0.6em 0.8em;
    border-bottom: 1px solid #f3f4f6;
}

.prose tbody tr:hover {
    background: #f9fafb;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5em 0;
}

.prose figure {
    margin: 1.5em 0;
}

.prose figcaption {
    text-align: center;
    font-size: 0.85em;
    color: #9ca3af;
    margin-top: 0.5em;
}

/* Horizontal rule */
.prose hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}

/* Mark / highlight */
.prose mark {
    background: #fef08a;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

/* Sub/Sup */
.prose sub,
.prose sup {
    font-size: 0.75em;
    vertical-align: baseline;
    position: relative;
}

.prose sup { top: -0.5em; }
.prose sub { bottom: -0.25em; }

/* Video / iframe embeds */
.prose iframe,
.prose video,
.prose embed,
.prose object {
    max-width: 100%;
    margin: 1.5em 0;
    border-radius: 10px;
}

/* WordPress-specific: captions */
.prose .wp-caption {
    max-width: 100%;
    margin: 1.5em 0;
}

.prose .wp-caption-text {
    text-align: center;
    font-size: 0.85em;
    color: #9ca3af;
    margin-top: 0.5em;
}

/* WordPress gallery */
.prose .gallery {
    display: grid;
    gap: 8px;
    margin: 1.5em 0;
}

.prose .gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.prose .gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.prose .gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }

.prose .gallery-item img {
    border-radius: 8px;
    margin: 0;
}

/* ── Plugin Overrides (make sure plugin shortcodes render well) ── */

.prose .anafp-product-card,
.prose .anafp-top10-list,
.prose .anafp-compare {
    font-family: inherit;
}

/* ── Pagination ─────────────────────────────────────────────────────── */

.nav-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s;
}

.nav-links .page-numbers:hover {
    background: var(--anafp-primary, #667eea);
    color: #fff;
    border-color: var(--anafp-primary, #667eea);
}

.nav-links .page-numbers.current {
    background: var(--anafp-primary, #667eea);
    color: #fff;
    border-color: var(--anafp-primary, #667eea);
    font-weight: 600;
}

.nav-links .page-numbers.dots {
    border: none;
    min-width: auto;
    cursor: default;
}

.nav-links .page-numbers.dots:hover {
    background: transparent;
    color: #6b7280;
}

/* ── WordPress Alignments ───────────────────────────────────────────── */

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

.alignwide {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Misc ───────────────────────────────────────────────────────────── */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.wp-caption,
.gallery-caption {
    font-size: 0.85em;
    color: #9ca3af;
    text-align: center;
}

/* Comment reply link */
.comment-reply-link {
    color: var(--anafp-primary, #667eea);
    text-decoration: underline;
    font-weight: 500;
}

/* ── Magazine Homepage ─────────────────────────────────────────────── */

/* Scrollbar-hide for category pill bar */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Magazine hero featured headline */
.mag-hero-featured h1 a {
    text-decoration: none;
}
.mag-hero-featured h1 a:hover {
    text-decoration: underline;
    text-decoration-color: var(--anafp-primary, #667eea);
    text-underline-offset: 4px;
}

/* Guide horizontal card hover */
.guide-card img {
    transition: transform 0.5s ease;
}
.guide-card:hover img {
    transform: scale(1.05);
}

/* Magazine grid equal-height cards */
.mag-grid article {
    display: flex;
    flex-direction: column;
}
.mag-grid article > .flex-1 {
    flex: 1 1 auto;
}

/* VS badge hover effect */
.vs-badge {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.vs-badge-parent:hover .vs-badge {
    transform: translate(-50%, 0) scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Line clamp utility (for Tailwind CDN compat) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Backdrop blur support for browsers */
.backdrop-blur-sm {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Ensure grid gaps are consistent */
.na-container > section .grid { gap: 2rem; }

/* ── Sidebar Widgets ──────────────────────────────────────────────── */

/* Sidebar card */
.na-card {
    background: #fff;
    border-radius: 12px;
}

/* Reset WP block widget wrappers */
.na-card .wp-block-group,
.na-card .wp-block-group__inner-container {
    margin: 0;
    padding: 0;
}

/* Widget headings */
.na-card h2.wp-block-heading,
.na-card .wp-block-heading {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    letter-spacing: -0.01em;
}

/* Widget lists */
.na-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.na-card ul li {
    padding: 0.375rem 0;
    border-bottom: 1px solid #f9fafb;
}

.na-card ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.na-card ul li:first-child {
    padding-top: 0;
}

/* Widget links */
.na-card a {
    color: #374151;
    text-decoration: none;
    font-size: 0.8125rem;
    line-height: 1.5;
    transition: color 0.15s;
}

.na-card a:hover {
    color: var(--anafp-primary, #667eea);
}

/* Latest posts list */
.na-card .wp-block-latest-posts__list {
    list-style: none;
    padding: 0;
}

.na-card .wp-block-latest-posts__post-title {
    display: block;
    font-weight: 500;
    color: #374151;
}

.na-card .wp-block-latest-posts__post-title:hover {
    color: var(--anafp-primary, #667eea);
}

/* Categories list */
.na-card .wp-block-categories-list {
    list-style: none;
    padding: 0;
}

.na-card .wp-block-categories-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Archives list */
.na-card .wp-block-archives-list {
    list-style: none;
    padding: 0;
}

/* Search widget */
.na-card .wp-block-search {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.na-card .wp-block-search__label {
    font-size: 0;
    line-height: 0;
    height: 0;
    overflow: hidden;
}

.na-card .wp-block-search__inside-wrapper {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    height: 38px;
}

.na-card .wp-block-search__input {
    flex: 1;
    border: none;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    background: transparent;
    outline: none;
    min-width: 0;
}

.na-card .wp-block-search__input:focus {
    box-shadow: none;
}

.na-card .wp-block-search__button {
    background: var(--anafp-primary, #667eea);
    color: #fff;
    border: none;
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.na-card .wp-block-search__button:hover {
    opacity: 0.9;
}

/* Recent comments */
.na-card .wp-block-latest-comments {
    list-style: none;
    padding: 0;
    font-size: 0.8125rem;
    color: #9ca3af;
}

/* No-comments placeholder */
.na-card .no-comments {
    font-size: 0.8125rem;
    color: #9ca3af;
    padding: 0.25rem 0;
}
