/*
Theme Name: Voltix
Theme URI: https://example.com/voltix
Author: Built with Claude
Author URI: https://example.com
Description: A modern 2026 Amazon-affiliate theme for gadget reviews. Includes a custom Review post type, score gauge, pros/cons, spec tables, comparison shortcode, Product/Review schema, dark mode, and full block support. Optimized for affiliate niche sites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: voltix
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar, custom-colors, editor-style
*/

/* ============================================================
   Voltix — Design tokens
   ============================================================ */
:root{
  --bg:#FBFBFD;
  --surface:#FFFFFF;
  --surface-2:#F2F3F7;
  --text:#14161C;
  --text-muted:#5B6170;
  --border:#E6E8EF;
  --brand:#5A31F4;
  --brand-2:#7C5CFF;
  --brand-ink:#FFFFFF;
  --buy:#FFB020;          /* Amazon-recognisable buy CTA */
  --buy-ink:#231A00;
  --good:#12B76A;
  --mid:#F5A623;
  --bad:#E5484D;
  --ring-track:#E6E8EF;

  --r-sm:8px;
  --r:14px;
  --r-lg:22px;
  --shadow-1:0 1px 2px rgba(16,20,40,.05);
  --shadow-2:0 10px 30px -12px rgba(20,22,45,.18);
  --maxw:1180px;
  --gap:clamp(1rem,2.5vw,2rem);

  --font-head:"Space Grotesk",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --font-body:"Inter",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}

html[data-theme="dark"]{
  --bg:#0C0E14;
  --surface:#14171F;
  --surface-2:#1B1F2A;
  --text:#EAECF2;
  --text-muted:#9AA1B2;
  --border:#262B38;
  --brand:#7C5CFF;
  --brand-2:#9E86FF;
  --ring-track:#262B38;
  --shadow-1:0 1px 2px rgba(0,0,0,.4);
  --shadow-2:0 16px 40px -16px rgba(0,0,0,.6);
}

/* ============================================================
   Reset / base
   ============================================================ */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{animation-duration:.001ms!important;transition-duration:.001ms!important}}
body{
  margin:0;
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
  font-size:1.02rem;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4,h5{font-family:var(--font-head);line-height:1.15;letter-spacing:-.02em;margin:0 0 .5em;font-weight:700}
h1{font-size:clamp(2rem,4.5vw,3rem)}
h2{font-size:clamp(1.5rem,3vw,2.1rem)}
h3{font-size:1.3rem}
p{margin:0 0 1.1em}
:focus-visible{outline:3px solid var(--brand);outline-offset:2px;border-radius:4px}
.container{max-width:var(--maxw);margin-inline:auto;padding-inline:clamp(1rem,4vw,2rem)}
.skip-link{position:absolute;left:-999px}
.skip-link:focus{left:1rem;top:1rem;z-index:999;background:var(--brand);color:#fff;padding:.6rem 1rem;border-radius:var(--r-sm)}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}

/* ============================================================
   Buttons / chips
   ============================================================ */
.btn{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--font-head);font-weight:600;font-size:.98rem;padding:.72rem 1.15rem;border-radius:var(--r-sm);border:1px solid transparent;cursor:pointer;transition:transform .12s ease,box-shadow .2s ease,background .2s ease;text-decoration:none;line-height:1}
.btn:hover{text-decoration:none;transform:translateY(-1px)}
.btn-brand{background:var(--brand);color:var(--brand-ink)}
.btn-ghost{background:transparent;color:var(--text);border-color:var(--border)}
.btn-ghost:hover{background:var(--surface-2)}
.btn-buy{background:var(--buy);color:var(--buy-ink);box-shadow:var(--shadow-1)}
.btn-buy:hover{box-shadow:var(--shadow-2)}
.btn-block{width:100%;justify-content:center;padding-block:.9rem}
.chip{display:inline-flex;align-items:center;gap:.35rem;font-size:.82rem;font-weight:500;padding:.32rem .7rem;border-radius:100px;background:var(--surface-2);color:var(--text-muted);border:1px solid var(--border);text-decoration:none}
.chip:hover{color:var(--text);border-color:var(--brand);text-decoration:none}

/* ============================================================
   Header
   ============================================================ */
.site-header{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid var(--border)}
.header-inner{display:flex;align-items:center;gap:1.25rem;height:66px}
.brand{display:flex;align-items:center;gap:.55rem;font-family:var(--font-head);font-weight:700;font-size:1.28rem;color:var(--text);text-decoration:none;letter-spacing:-.03em}
.brand:hover{text-decoration:none}
.brand-mark{width:30px;height:30px;border-radius:9px;background:linear-gradient(135deg,var(--brand),var(--brand-2));display:grid;place-items:center;color:#fff;font-size:1rem;box-shadow:var(--shadow-1)}
.brand small{display:block;font-family:var(--font-body);font-weight:400;font-size:.68rem;color:var(--text-muted);letter-spacing:0}
.main-nav{margin-left:auto}
.main-nav ul{display:flex;gap:.35rem;list-style:none;margin:0;padding:0}
.main-nav a{display:block;padding:.5rem .8rem;border-radius:var(--r-sm);color:var(--text);font-weight:500;font-size:.96rem}
.main-nav a:hover{background:var(--surface-2);text-decoration:none}
.main-nav .current-menu-item>a{color:var(--brand)}
.header-tools{display:flex;align-items:center;gap:.4rem}
.icon-btn{width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer}
.icon-btn:hover{background:var(--surface-2)}
.icon-btn svg{width:20px;height:20px}
.theme-toggle .moon{display:none}
html[data-theme="dark"] .theme-toggle .sun{display:none}
html[data-theme="dark"] .theme-toggle .moon{display:block}
.menu-toggle{display:none}

/* search dropdown */
.header-search{position:relative}
.search-panel{position:absolute;right:0;top:52px;width:min(360px,80vw);background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--shadow-2);padding:.8rem;display:none}
.search-panel.open{display:block}
.search-form{display:flex;gap:.5rem}
.search-form input[type=search]{flex:1;padding:.6rem .8rem;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--bg);color:var(--text);font:inherit}

/* ============================================================
   Layout scaffolding
   ============================================================ */
.site-main{padding-block:clamp(1.5rem,4vw,3rem)}
.layout{display:grid;grid-template-columns:1fr;gap:clamp(1.5rem,4vw,3rem)}
.has-sidebar{grid-template-columns:minmax(0,1fr) 320px}
@media (max-width:960px){.has-sidebar{grid-template-columns:1fr}}

/* ============================================================
   Cards / archive grid
   ============================================================ */
.grid{display:grid;gap:1.4rem;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow-1);transition:transform .18s ease,box-shadow .25s ease,border-color .25s ease}
.card:hover{transform:translateY(-3px);box-shadow:var(--shadow-2);border-color:color-mix(in srgb,var(--brand) 40%,var(--border))}
.card-thumb{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--surface-2)}
.card-thumb img{width:100%;height:100%;object-fit:cover}
.card-badge{position:absolute;top:.7rem;left:.7rem}
.card-score{position:absolute;bottom:.7rem;right:.7rem;background:var(--surface);border:1px solid var(--border);border-radius:100px;padding:.28rem .6rem;font-family:var(--font-head);font-weight:700;font-size:.9rem;display:flex;align-items:center;gap:.3rem;box-shadow:var(--shadow-1)}
.card-body{padding:1.1rem 1.15rem 1.25rem;display:flex;flex-direction:column;gap:.55rem;flex:1}
.card-cat{font-size:.78rem;font-weight:600;color:var(--brand);font-family:var(--font-head)}
.card-title{font-size:1.16rem;margin:0;line-height:1.25}
.card-title a{color:var(--text)}
.card-title a:hover{color:var(--brand);text-decoration:none}
.card-excerpt{color:var(--text-muted);font-size:.94rem;margin:0}
.card-meta{margin-top:auto;display:flex;align-items:center;gap:.6rem;font-size:.82rem;color:var(--text-muted);padding-top:.4rem}
.card-meta .dot{width:3px;height:3px;border-radius:50%;background:var(--text-muted);opacity:.6}

/* ============================================================
   Score gauge (the signature element)
   ============================================================ */
.gauge{--val:0;--size:112px;width:var(--size);height:var(--size);border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(var(--gauge-color) calc(var(--val)*3.6deg),var(--ring-track) 0);flex:none}
.gauge::before{content:"";position:absolute;inset:9px;border-radius:50%;background:var(--surface)}
.gauge .gauge-num{position:relative;font-family:var(--font-head);font-weight:700;font-size:calc(var(--size)*.3);line-height:1}
.gauge .gauge-den{position:relative;font-size:.7rem;color:var(--text-muted);margin-top:2px}
.gauge.sm{--size:64px}

/* ============================================================
   Hero (front page)
   ============================================================ */
.hero{padding-block:clamp(2rem,5vw,3.5rem)}
.hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:clamp(1.5rem,4vw,3rem);align-items:center}
@media (max-width:860px){.hero-grid{grid-template-columns:1fr}}
.hero-eyebrow{display:inline-flex;align-items:center;gap:.5rem;color:var(--text-muted);font-weight:500;font-size:.92rem;margin-bottom:.9rem}
.hero-eyebrow b{color:var(--brand)}
.hero h1{margin-bottom:.6rem}
.hero-lead{font-size:1.12rem;color:var(--text-muted);max-width:52ch;margin-bottom:1.4rem}
.hero-actions{display:flex;flex-wrap:wrap;gap:.7rem;margin-bottom:1.3rem}
.hero-cats{display:flex;flex-wrap:wrap;gap:.5rem}
.spotlight{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:1.1rem;box-shadow:var(--shadow-2);position:relative}
.spotlight-tag{position:absolute;top:-12px;left:20px;background:var(--brand);color:#fff;font-family:var(--font-head);font-weight:600;font-size:.75rem;padding:.3rem .7rem;border-radius:100px}
.spotlight-thumb{border-radius:var(--r);overflow:hidden;aspect-ratio:16/10;background:var(--surface-2);margin-bottom:.9rem}
.spotlight-thumb img{width:100%;height:100%;object-fit:cover}
.spotlight-row{display:flex;gap:1rem;align-items:center}
.spotlight-row .meta{flex:1}
.spotlight-row h3{margin:0 0 .3rem;font-size:1.2rem}
.spotlight-row h3 a{color:var(--text)}

/* section header */
.section{padding-block:clamp(1.6rem,4vw,2.6rem)}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:1.4rem}
.section-head p{margin:.2rem 0 0;color:var(--text-muted)}
.section-head .link-more{font-family:var(--font-head);font-weight:600;font-size:.92rem;white-space:nowrap}

/* ============================================================
   Single post / review
   ============================================================ */
.article-head{max-width:760px;margin:0 auto clamp(1.2rem,3vw,2rem)}
.article-cat{margin-bottom:.7rem}
.article-title{margin-bottom:.7rem}
.article-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;color:var(--text-muted);font-size:.92rem}
.article-meta img.avatar{width:30px;height:30px;border-radius:50%}
.featured-media{border-radius:var(--r-lg);overflow:hidden;margin-bottom:1.6rem;background:var(--surface-2)}
.entry-content{max-width:760px;margin:0 auto;font-size:1.06rem}
.entry-content>*{margin-bottom:1.15em}
.entry-content h2{margin-top:1.8em}
.entry-content h3{margin-top:1.4em}
.entry-content img{border-radius:var(--r)}
.entry-content blockquote{margin:1.6em 0;padding:.4em 1.2em;border-left:4px solid var(--brand);color:var(--text-muted);font-size:1.1rem}
.entry-content a{text-decoration:underline;text-underline-offset:2px}
.entry-content ul,.entry-content ol{padding-left:1.3em}
.entry-content li{margin-bottom:.45em}
.entry-content code{background:var(--surface-2);padding:.15em .4em;border-radius:6px;font-size:.9em}
.entry-content table{width:100%;border-collapse:collapse}
.entry-content th,.entry-content td{border:1px solid var(--border);padding:.6rem .8rem;text-align:left}

/* review verdict card */
.review-verdict{max-width:760px;margin:0 auto 1.6rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:clamp(1.1rem,3vw,1.6rem);box-shadow:var(--shadow-1)}
.rv-top{display:flex;gap:1.4rem;align-items:center;flex-wrap:wrap}
.rv-score{display:flex;flex-direction:column;align-items:center;gap:.5rem}
.rv-label{font-family:var(--font-head);font-weight:600;font-size:.8rem;color:var(--text-muted)}
.rv-body{flex:1;min-width:220px}
.rv-body h2{margin:0 0 .3rem;font-size:1.35rem}
.rv-price{font-family:var(--font-head);font-weight:700;font-size:1.5rem;margin:.2rem 0 .8rem}
.rv-price s{color:var(--text-muted);font-weight:400;font-size:1rem;margin-left:.4rem}
.rv-cta{display:flex;flex-direction:column;gap:.5rem;min-width:210px}
.rv-cta small{color:var(--text-muted);font-size:.76rem;text-align:center}

/* pros/cons */
.proscons{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:760px;margin:0 auto 1.6rem}
@media (max-width:560px){.proscons{grid-template-columns:1fr}}
.pc-box{border:1px solid var(--border);border-radius:var(--r);padding:1.1rem 1.2rem;background:var(--surface)}
.pc-box h3{display:flex;align-items:center;gap:.5rem;font-size:1.05rem;margin:0 0 .7rem}
.pc-box ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.55rem}
.pc-box li{display:flex;gap:.55rem;font-size:.96rem;line-height:1.45}
.pc-box li::before{content:"";width:18px;height:18px;flex:none;margin-top:2px;border-radius:50%;background-size:12px;background-repeat:no-repeat;background-position:center}
.pc-pros h3{color:var(--good)}
.pc-pros li::before{background-color:color-mix(in srgb,var(--good) 18%,transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312B76A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")}
.pc-cons h3{color:var(--bad)}
.pc-cons li::before{background-color:color-mix(in srgb,var(--bad) 18%,transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E5484D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E")}

/* rating breakdown bars */
.rating-bars{max-width:760px;margin:0 auto 1.6rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:1.2rem}
.rb-row{display:grid;grid-template-columns:130px 1fr 40px;align-items:center;gap:.8rem;margin-bottom:.6rem}
.rb-row:last-child{margin-bottom:0}
.rb-label{font-size:.9rem;color:var(--text-muted)}
.rb-track{height:8px;border-radius:100px;background:var(--ring-track);overflow:hidden}
.rb-fill{height:100%;border-radius:100px;background:linear-gradient(90deg,var(--brand),var(--brand-2))}
.rb-val{font-family:var(--font-head);font-weight:600;font-size:.9rem;text-align:right}

/* spec table */
.spec-table{max-width:760px;margin:0 auto 1.6rem;border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.spec-table table{width:100%;border-collapse:collapse}
.spec-table th,.spec-table td{padding:.7rem 1rem;text-align:left;font-size:.95rem;border-bottom:1px solid var(--border)}
.spec-table tr:last-child th,.spec-table tr:last-child td{border-bottom:0}
.spec-table th{width:40%;color:var(--text-muted);font-weight:600;background:var(--surface-2)}

/* comparison table shortcode */
.compare-wrap{overflow-x:auto;margin:1.6em 0;border:1px solid var(--border);border-radius:var(--r)}
.compare-table{width:100%;border-collapse:collapse;min-width:560px}
.compare-table th,.compare-table td{padding:.9rem 1rem;text-align:center;border-bottom:1px solid var(--border)}
.compare-table thead th{background:var(--surface-2);font-family:var(--font-head);vertical-align:bottom}
.compare-table tbody th{text-align:left;color:var(--text-muted);font-weight:600}
.compare-table .ct-name{font-family:var(--font-head);font-weight:700;font-size:1.02rem;color:var(--text)}
.compare-table .ct-pick{color:var(--brand);font-size:.78rem;font-weight:600;display:block;margin-bottom:.2rem}

/* disclosure */
.affiliate-disclosure{max-width:760px;margin:0 auto 1.4rem;background:var(--surface-2);border:1px dashed var(--border);border-radius:var(--r-sm);padding:.7rem 1rem;font-size:.85rem;color:var(--text-muted)}
.entry-disclosure{font-size:.82rem;color:var(--text-muted);font-style:italic;margin-bottom:1.2rem}

/* ============================================================
   Sidebar / widgets
   ============================================================ */
.sidebar .widget{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:1.2rem;margin-bottom:1.4rem}
.sidebar .widget-title{font-size:1.05rem;margin:0 0 .9rem;padding-bottom:.6rem;border-bottom:1px solid var(--border)}
.sidebar ul{list-style:none;margin:0;padding:0}
.sidebar li{padding:.4rem 0;border-bottom:1px solid var(--border)}
.sidebar li:last-child{border-bottom:0}
.sidebar a{color:var(--text)}
.sidebar a:hover{color:var(--brand)}

/* ============================================================
   Pagination / comments / footer
   ============================================================ */
.pagination{display:flex;gap:.4rem;justify-content:center;margin-top:2rem;flex-wrap:wrap}
.pagination .page-numbers{display:grid;place-items:center;min-width:42px;height:42px;padding:0 .6rem;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface);color:var(--text);font-family:var(--font-head);font-weight:600;text-decoration:none}
.pagination .page-numbers.current{background:var(--brand);color:#fff;border-color:var(--brand)}
.pagination a.page-numbers:hover{border-color:var(--brand);text-decoration:none}

.comments-area{max-width:760px;margin:2.4rem auto 0}
.comment-list{list-style:none;padding:0;margin:0}
.comment-body{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:1rem 1.2rem;margin-bottom:1rem}
.comment-list .children{list-style:none;margin-left:1.5rem}
.comment-meta{font-size:.85rem;color:var(--text-muted);margin-bottom:.4rem}
.comment-form input,.comment-form textarea{width:100%;padding:.7rem .9rem;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--bg);color:var(--text);font:inherit;margin-bottom:.8rem}

.site-footer{border-top:1px solid var(--border);background:var(--surface);margin-top:clamp(2.5rem,6vw,4rem)}
.footer-top{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:2rem;padding-block:clamp(2rem,4vw,3rem)}
@media (max-width:760px){.footer-top{grid-template-columns:1fr 1fr}}
@media (max-width:480px){.footer-top{grid-template-columns:1fr}}
.footer-col h4{font-size:.95rem;margin:0 0 .9rem}
.footer-col ul{list-style:none;margin:0;padding:0}
.footer-col li{margin-bottom:.5rem}
.footer-col a{color:var(--text-muted)}
.footer-col a:hover{color:var(--brand)}
.footer-about p{color:var(--text-muted);font-size:.94rem;max-width:34ch}
.footer-bottom{border-top:1px solid var(--border);padding-block:1.2rem;display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;font-size:.86rem;color:var(--text-muted)}

/* ============================================================
   Responsive nav
   ============================================================ */
@media (max-width:820px){
  .menu-toggle{display:grid}
  .main-nav{position:fixed;inset:66px 0 auto 0;background:var(--surface);border-bottom:1px solid var(--border);margin:0;padding:.6rem 1rem 1rem;transform:translateY(-120%);transition:transform .25s ease;box-shadow:var(--shadow-2)}
  .main-nav.open{transform:translateY(0)}
  .main-nav ul{flex-direction:column;gap:.1rem}
  .main-nav a{padding:.8rem 1rem}
}

.page-hero{background:var(--surface);border-bottom:1px solid var(--border);padding-block:clamp(1.6rem,4vw,2.6rem);margin-bottom:2rem}
.page-hero .crumbs{font-size:.85rem;color:var(--text-muted);margin-bottom:.5rem}
.page-hero .crumbs a{color:var(--text-muted)}
.page-hero h1{margin:0}

.entry-tags{max-width:760px;margin:1.8rem auto 0;display:flex;flex-wrap:wrap;gap:.5rem}
.author-box{max-width:760px;margin:2rem auto 0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:1.2rem;display:flex;gap:1rem;align-items:center}
.author-box img{width:56px;height:56px;border-radius:50%}
.post-nav{max-width:760px;margin:2rem auto 0;display:flex;justify-content:space-between;gap:1rem}
.post-nav a{font-family:var(--font-head);font-weight:600}
