/*
Theme Name: Themes & Plugins
Theme URI: https://themesandplugins.xyz
Author: ThemesAndPlugins
Author URI: https://themesandplugins.xyz
Description: A clean plugin directory theme with post-style listings, category badges, load-more pagination, and a lifetime bundle CTA. Built for themesandplugins.xyz.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tap
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ─── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #ffffff;
  --bg2:       #f8f7fb;
  --bg3:       #f1eff8;
  --card:      #ffffff;
  --border:    #e8e5f0;
  --border2:   #d0cce4;
  --text:      #1a1825;
  --muted:     #6b6785;
  --light:     #9590b0;
  --accent:    #6c5fc7;
  --accent-h:  #5a4eb0;
  --accent-lt: #eeedfe;
  --accent-bd: #afa9ec;
  --orange:    #e07a5f;
  --orange-h:  #c9653c;
  --radius:    8px;
  --radius-lg: 14px;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --font-head: 'Georgia', 'Times New Roman', serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg2); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ─── Layout ────────────────────────────────────────────────────────── */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container--wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ─── Site Header ───────────────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-logo { display: flex; align-items: center; gap: 8px; }
.site-logo__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.site-title {
  font-size: 16px; font-weight: 600; color: var(--text); line-height: 1;
}
.site-title a { color: inherit; text-decoration: none; }
.site-title span { color: var(--muted); font-weight: 400; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 14px; color: var(--muted); padding: 6px 12px;
  border-radius: var(--radius); transition: all .15s; background: none; border: none;
  cursor: pointer; font-family: var(--font);
}
.nav-link:hover { color: var(--text); background: var(--bg2); }

.header-cta {
  background: var(--accent); color: #fff; border: none;
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  border-radius: var(--radius); cursor: pointer; transition: background .15s;
  white-space: nowrap; font-family: var(--font); text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.header-cta:hover { background: var(--accent-h); text-decoration: none; color: #fff; }

/* ─── Archive Header ────────────────────────────────────────────────── */
.archive-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 24px;
}
.archive-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--light); margin-bottom: 6px;
}
.archive-title { font-size: 26px; font-weight: 600; margin-bottom: 6px; font-family: var(--font-head); }
.archive-description { font-size: 15px; color: var(--muted); }
.archive-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.archive-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted); background: var(--bg2);
  padding: 5px 11px; border-radius: 20px; border: 1px solid var(--border);
}

/* ─── Feed ──────────────────────────────────────────────────────────── */
.plugin-feed { background: var(--bg); border-bottom: 1px solid var(--border); }

/* ─── Post Entry ────────────────────────────────────────────────────── */
.plugin-entry {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 16px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.plugin-entry:last-child { border-bottom: none; }
.plugin-entry:hover { background: var(--bg3); }
.plugin-entry:hover { text-decoration: none; }

.plugin-entry--featured {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin-left: -20px;
}
@media (max-width: 600px) {
  .plugin-entry--featured { margin-left: 0; padding-left: 0; border-left: none; border-top: 3px solid var(--accent); }
}

.entry-content {}
.entry-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }

.cat-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; border: 1px solid;
}
.cat-badge--performance { background: #eeedfe; color: #534ab7; border-color: #afa9ec; }
.cat-badge--security    { background: #e1f5ee; color: #0f6e56; border-color: #5dcaa5; }
.cat-badge--seo         { background: #faeeda; color: #854f0b; border-color: #ef9f27; }
.cat-badge--forms       { background: #fbeaf0; color: #993556; border-color: #ed93b1; }
.cat-badge--woocommerce { background: #e6f1fb; color: #185fa5; border-color: #85b7eb; }
.cat-badge--media       { background: #eaf3de; color: #3b6d11; border-color: #97c459; }
.cat-badge--backup      { background: #e1f5ee; color: #0f6e56; border-color: #5dcaa5; }
.cat-badge--multilingual{ background: #faeeda; color: #854f0b; border-color: #ef9f27; }
.cat-badge--analytics   { background: #eeedfe; color: #534ab7; border-color: #afa9ec; }
.cat-badge--login       { background: #fcebeb; color: #a32d2d; border-color: #f09595; }
.cat-badge--marketing   { background: #e6f1fb; color: #185fa5; border-color: #85b7eb; }
.cat-badge--default     { background: var(--bg3); color: var(--muted); border-color: var(--border2); }

.featured-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-lt); padding: 3px 9px;
  border-radius: 4px; border: 1px solid var(--accent-bd);
}

.entry-title {
  font-size: 18px; font-weight: 600; margin-bottom: 6px;
  line-height: 1.3; color: var(--text); font-family: var(--font-head);
}
.plugin-entry--featured .entry-title { font-size: 20px; }

.entry-excerpt {
  font-size: 14px; color: var(--muted); line-height: 1.65;
  margin-bottom: 12px;
}

.entry-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
.meta-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--light);
}
.meta-item svg { width: 13px; height: 13px; opacity: .7; flex-shrink: 0; }
.read-more {
  margin-left: auto; font-size: 12px; font-weight: 600;
  color: var(--accent); display: inline-flex; align-items: center; gap: 3px;
}
.read-more svg { width: 12px; height: 12px; }

.entry-aside {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 2px;
}
.plugin-icon-wrap {
  width: 48px; height: 48px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.entry-number { font-size: 11px; color: var(--light); font-weight: 600; }

/* ─── Bundle Strip ──────────────────────────────────────────────────── */
.bundle-strip {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  margin: 0;
}
.bundle-strip__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.bundle-strip__text h2 { font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.bundle-strip__text p  { font-size: 13px; color: var(--muted); }
.bundle-strip__price {
  display: flex; align-items: baseline; gap: 8px; flex-shrink: 0;
}
.price-amount { font-size: 28px; font-weight: 700; color: var(--accent); letter-spacing: -1px; }
.price-label  { font-size: 13px; color: var(--muted); }
.bundle-cta {
  background: var(--orange); color: #fff; border: none;
  font-size: 14px; font-weight: 600; padding: 11px 22px;
  border-radius: var(--radius); cursor: pointer; white-space: nowrap;
  transition: background .15s; font-family: var(--font); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.bundle-cta:hover { background: var(--orange-h); text-decoration: none; color: #fff; }

/* ─── Load More ─────────────────────────────────────────────────────── */
.load-more-section { padding: 32px 0; text-align: center; }
.load-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border2);
  font-size: 14px; font-weight: 500; padding: 11px 28px;
  border-radius: var(--radius); cursor: pointer;
  transition: all .15s; font-family: var(--font);
}
.load-more-btn:hover { background: var(--bg3); border-color: var(--accent); color: var(--accent); }
.load-more-btn svg { width: 15px; height: 15px; }
.load-more-btn.loading { opacity: .6; pointer-events: none; }
.all-loaded { font-size: 13px; color: var(--light); padding: 8px 0; }
.posts-count { display: block; font-size: 12px; color: var(--light); margin-top: 8px; }

/* ─── Single Plugin Page ────────────────────────────────────────────── */
.single-plugin-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 28px;
}
.single-back {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--muted); margin-bottom: 20px;
  transition: color .12s;
}
.single-back:hover { color: var(--text); text-decoration: none; }
.single-back svg { width: 14px; height: 14px; }

.single-plugin-top {
  display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap;
}
.single-plugin-icon {
  width: 64px; height: 64px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
}
.single-plugin-meta { flex: 1; min-width: 200px; }
.single-plugin-meta h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; font-family: var(--font-head); }
.single-plugin-meta .tagline { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.single-plugin-cats { display: flex; flex-wrap: wrap; gap: 6px; }

.single-plugin-body { padding: 36px 0; }
.single-plugin-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 700px) { .single-plugin-grid { grid-template-columns: 1fr; } }

.plugin-content {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}
.plugin-content h2 {
  font-size: 17px; font-weight: 600; margin: 24px 0 10px;
  font-family: var(--font-head); border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.plugin-content h2:first-child { margin-top: 0; }
.plugin-content p { font-size: 14px; color: var(--muted); line-height: 1.75; margin-bottom: 12px; }
.plugin-content ul { padding-left: 18px; margin-bottom: 16px; list-style: disc; }
.plugin-content li { font-size: 14px; color: var(--muted); line-height: 1.85; }
.plugin-content li::marker { color: var(--accent); }

/* Sidebar boxes */
.sidebar-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px;
}
.sidebar-box:last-child { margin-bottom: 0; }
.sidebar-box__label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--light); margin-bottom: 14px;
}
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.spec-table tr:last-child td { border-bottom: none; padding-bottom: 0; }
.spec-table td:first-child { color: var(--muted); }
.spec-table td:last-child { text-align: right; font-weight: 500; color: var(--text); }

.feature-list { list-style: none; }
.feature-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-check { color: #1d9e75; flex-shrink: 0; }
.feature-check svg { width: 15px; height: 15px; }

.cta-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px;
  text-align: center;
}
.cta-box .cta-price {
  font-size: 26px; font-weight: 700; color: var(--accent);
  margin-bottom: 2px; letter-spacing: -0.5px;
}
.cta-box .cta-note { font-size: 12px; color: var(--light); margin-bottom: 14px; }
.cta-box .cta-btn {
  display: block; width: 100%; background: var(--accent); color: #fff;
  border: none; font-size: 14px; font-weight: 600; padding: 11px 16px;
  border-radius: var(--radius); cursor: pointer; font-family: var(--font);
  transition: background .15s; text-decoration: none; text-align: center;
}
.cta-box .cta-btn:hover { background: var(--accent-h); text-decoration: none; color: #fff; }
.cta-box .cta-sub { font-size: 11px; color: var(--light); margin-top: 8px; }

/* ─── Site Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 24px 0; margin-top: 0;
}
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-brand { font-size: 14px; font-weight: 600; }
.footer-brand span { color: var(--muted); font-weight: 400; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--light); }

/* ─── Utilities ─────────────────────────────────────────────────────── */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.wp-block-image img { border-radius: var(--radius); }
.aligncenter { text-align: center; }

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .plugin-entry { grid-template-columns: 1fr 44px; gap: 10px; }
  .plugin-icon-wrap { width: 40px; height: 40px; font-size: 18px; }
  .site-nav { display: none; }
  .archive-title { font-size: 20px; }
  .bundle-strip__inner { flex-direction: column; align-items: flex-start; }
  .bundle-cta { width: 100%; justify-content: center; }
}
