/*
Theme Name: Trend Roundup
Theme URI: https://example.com
Author: You
Description: A custom theme for building "Best Product" roundup posts (comparison table, ranked reviews, pros/cons, FAQ) with a matching frontend layout. Built for the Trend Global style buying-guide format.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: trend-roundup
*/

:root{
  --tr-text:#232323;
  --tr-muted:#6b7280;
  --tr-border:#e6e6e6;
  --tr-accent:#c8102e;
  --tr-link:#c8102e;
  --tr-star:#de7921;
  --tr-star-bg:#d5d9d9;
  --tr-bg-soft:#f8f8f7;
  --tr-max:1180px;
  --tr-heading-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --tr-body-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:var(--tr-body-font);
  color:var(--tr-text);
  line-height:1.7;
  background:#fff;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--tr-link);text-decoration:none;}
a:hover{text-decoration:underline;}
h1,h2,h3,h4,h5,h6,.tr-logo{font-family:var(--tr-heading-font);}

.tr-container{max-width:var(--tr-max);margin:0 auto;padding:0 20px;}

/* Header */
.tr-site-header{border-bottom:1px solid var(--tr-border);padding:16px 0;}
.tr-site-header .tr-container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;}
.tr-logo{font-weight:800;font-size:1.3rem;color:var(--tr-text);}
.tr-nav ul{list-style:none;display:flex;gap:22px;margin:0;padding:0;}
.tr-nav a{color:var(--tr-text);font-weight:600;font-size:.95rem;}

/* Article header */
.tr-article-header{max-width:var(--tr-max);margin:36px auto 0;padding:0 20px;}
.tr-title{font-size:2.1rem;line-height:1.25;margin:0 0 10px;}
.tr-meta{color:var(--tr-muted);font-size:.9rem;margin-bottom:22px;}
.tr-hero img{border-radius:8px;width:100%;object-fit:cover;}

.tr-article-body{max-width:var(--tr-max);margin:0 auto;padding:28px 20px 60px;}

.tr-disclosure{
  font-size:.85rem;color:var(--tr-muted);font-style:italic;
  border-left:3px solid var(--tr-border);padding:8px 14px;margin:18px 0 28px;
}
.tr-disclosure a{font-weight:600;}

.tr-intro p{margin:0 0 16px;}

/* Comparison table -- its own visually separated section */
.tr-section-comparison{
  margin:36px 0;padding:26px;border:1px solid var(--tr-border);border-radius:10px;
}
.tr-section-comparison h2{margin-top:0;}
.tr-compare-wrap{overflow-x:auto;margin:18px 0 0;}
table.tr-compare{width:100%;border-collapse:collapse;font-size:.92rem;}
table.tr-compare th, table.tr-compare td{padding:12px 14px;border:1px solid var(--tr-border);text-align:left;vertical-align:middle;}
table.tr-compare th{background:var(--tr-bg-soft);}
table.tr-compare td a{font-weight:700;}

/* Amazon-style star rating: two stacked rows of SVG stars, foreground row
   clipped to a percentage width to show partial (e.g. half) stars. */
.tr-star-bar{
  position:relative;display:inline-flex;width:88px;height:16px;
  vertical-align:middle;
}
.tr-star-bar-bg,.tr-star-bar-fg{
  position:absolute;top:0;left:0;display:flex;overflow:hidden;white-space:nowrap;
}
.tr-star-bar-fg{width:0;}
.tr-star-bar-bg svg{fill:var(--tr-star-bg);}
.tr-star-bar-fg svg{fill:var(--tr-star);}
.tr-star-bar-bg svg,.tr-star-bar-fg svg{
  width:16px;height:16px;flex:0 0 auto;margin-right:2px;
}
.tr-star-num{margin-left:6px;font-weight:700;font-size:.9rem;vertical-align:middle;color:var(--tr-text);}

/* Section headings */
.tr-article-body h2{font-size:1.5rem;margin:5px 0 22px;}
.tr-article-body h3{font-size:1.2rem;margin:26px 0 10px;}
.tr-article-body ul{padding-left:22px;}

/* Product review card */
.tr-product{
  margin:20px 0;padding:24px;border:1px solid var(--tr-border);border-radius:10px;
}
.tr-product-badge{font-weight:700;color:var(--tr-accent);margin:2px 0 14px;}

.tr-product-top{
  display:grid;grid-template-columns:1fr 300px;gap:26px;align-items:start;margin-bottom:18px;
}
@media (max-width:640px){.tr-product-top{grid-template-columns:1fr;}}
.tr-product-top-text p{margin:0 0 16px;}
.tr-product-cta{
  display:inline-block;background:var(--tr-accent);color:#fff;font-weight:700;
  padding:10px 22px;border-radius:6px;
}
.tr-product-cta:hover{opacity:.9;text-decoration:none;}
.tr-product-image img{border-radius:8px;}

.tr-product-desc p{margin:0 0 14px;}

.tr-proscons{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0;}
@media (max-width:640px){.tr-proscons{grid-template-columns:1fr;}}
.tr-pros h5, .tr-cons h5{margin:0 0 8px;font-size:.95rem;text-transform:uppercase;letter-spacing:.03em;}
.tr-pros ul, .tr-cons ul{margin:0;padding-left:20px;}
.tr-pros li, .tr-cons li{margin-bottom:6px;}

.tr-bestfor{background:var(--tr-bg-soft);border-radius:8px;padding:14px 18px;margin-top:16px;}
.tr-bestfor strong{display:block;margin-bottom:4px;}

/* FAQ */
.tr-faq-item{border-bottom:1px solid var(--tr-border);padding:16px 0;}
.tr-faq-item h3{margin:0 0 8px;font-size:1.05rem;}
.tr-faq-item p{margin:0;color:#444;}

/* Author box */
.tr-author{display:flex;gap:18px;align-items:flex-start;margin:44px 0 20px;padding:22px;background:var(--tr-bg-soft);border-radius:10px;}
.tr-author img{width:72px;height:72px;border-radius:50%;object-fit:cover;flex:0 0 auto;}
.tr-author h4{margin:0 0 6px;}
.tr-author p{margin:0 0 10px;color:#444;font-size:.95rem;}
.tr-author-links a{margin-right:14px;font-weight:600;font-size:.9rem;}

/* Footer */
.tr-site-footer{border-top:1px solid var(--tr-border);padding:30px 0;margin-top:50px;color:var(--tr-muted);font-size:.85rem;}
.tr-site-footer .tr-container{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;}
.tr-footer-links a{color:var(--tr-muted);margin-right:16px;}

/* Homepage */
.tr-home-hero{background:var(--tr-bg-soft);padding:60px 0;text-align:center;}
.tr-home-hero h1{font-size:2.2rem;margin:0 0 12px;}
.tr-home-hero p{color:var(--tr-muted);font-size:1.05rem;max-width:640px;margin:0 auto;}

.tr-roundup-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:28px;
  max-width:var(--tr-max);margin:0 auto;padding:44px 20px;
}
.tr-roundup-card{
  display:block;border:1px solid var(--tr-border);border-radius:10px;overflow:hidden;
  color:var(--tr-text);transition:box-shadow .15s ease,transform .15s ease;
}
.tr-roundup-card:hover{box-shadow:0 6px 18px rgba(0,0,0,.08);transform:translateY(-2px);text-decoration:none;}
.tr-roundup-card img{aspect-ratio:16/10;object-fit:cover;width:100%;}
.tr-roundup-card-body{padding:16px;}
.tr-roundup-card-meta{color:var(--tr-muted);font-size:.78rem;margin:0 0 8px;text-transform:uppercase;letter-spacing:.03em;}
.tr-roundup-card-meta span{margin-right:4px;}
.tr-roundup-card h2{font-size:1.05rem;margin:0 0 8px;line-height:1.35;}
.tr-roundup-card p{color:var(--tr-muted);font-size:.9rem;margin:0 0 10px;}
.tr-roundup-card-link{color:var(--tr-link);font-weight:700;font-size:.88rem;}
