/*
Theme Name: DealGraded
Theme URI: https://dealgraded.com
Author: DealGraded
Description: Professional Amazon affiliate review blog theme with dark header, orange accents and product review layouts.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: dealgraded
*/

/* =============================================
   CSS VARIABLES
============================================= */
:root {
  --orange: #FF9900;
  --orange-dark: #e68900;
  --black: #111111;
  --dark: #1a1a1a;
  --gray-dark: #2d2d2d;
  --gray: #666666;
  --gray-light: #f5f5f5;
  --white: #ffffff;
  --border: #e8e8e8;
  --text: #222222;
  --text-muted: #666666;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', sans-serif;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: #fafafa;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange-dark); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   GOOGLE FONTS
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=Source+Sans+3:wght@400;600;700&display=swap');

/* =============================================
   HEADER
============================================= */
#site-header {
  background: var(--black);
  border-bottom: 3px solid var(--orange);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; }

.logo-name {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo-name span { color: var(--orange); }

.logo-tagline {
  font-size: 10px;
  color: #888;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* =============================================
   NAVIGATION
============================================= */
#site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

#site-nav ul li a {
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#site-nav ul li a:hover,
#site-nav ul li.current-menu-item a {
  color: var(--orange);
  background: rgba(255,153,0,0.1);
}

/* =============================================
   HERO BANNER
============================================= */
.site-hero {
  background: var(--black);
  padding: 48px 24px;
  text-align: center;
  border-bottom: 1px solid #222;
}

.site-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 48px);
  color: var(--white);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.site-hero h1 span { color: var(--orange); }

.site-hero p {
  color: #aaa;
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

/* =============================================
   CATEGORY PILLS
============================================= */
.category-pills {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
}

.category-pills-inner {
  display: flex;
  gap: 4px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 0;
}

.category-pills a {
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}

.category-pills a:hover,
.category-pills a.active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

/* =============================================
   MAIN LAYOUT
============================================= */
#main-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

/* =============================================
   POST CARDS
============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-body { padding: 20px; }

.post-card-category {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.post-card-title:hover { color: var(--orange); }

.post-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.read-more-btn {
  background: var(--orange);
  color: var(--white) !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s;
}

.read-more-btn:hover { background: var(--orange-dark); color: var(--white) !important; }

/* =============================================
   FEATURED POST (first post bigger)
============================================= */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.post-card.featured .post-card-image,
.post-card.featured .post-card-image-placeholder {
  height: 100%;
  min-height: 280px;
}

.post-card.featured .post-card-title { font-size: 24px; }
.post-card.featured .post-card-body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }

/* =============================================
   SIDEBAR
============================================= */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.sidebar-widget-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--orange);
}

/* Top Picks widget */
.top-pick-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

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

.top-pick-num {
  width: 28px;
  height: 28px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.top-pick-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.top-pick-title:hover { color: var(--orange); }

/* Newsletter widget */
.newsletter-widget { background: var(--black); color: var(--white); }
.newsletter-widget .sidebar-widget-title { color: var(--white); }
.newsletter-widget p { font-size: 13px; color: #aaa; margin-bottom: 16px; }

.newsletter-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #444;
  background: #222;
  color: var(--white);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 10px;
  outline: none;
}

.newsletter-form input:focus { border-color: var(--orange); }

.newsletter-form button {
  width: 100%;
  padding: 11px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-form button:hover { background: var(--orange-dark); }

/* =============================================
   SINGLE POST / REVIEW
============================================= */
.single-post-wrap {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

.single-post-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.single-post-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--text);
}

.single-post-content h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 14px;
  color: var(--text);
  padding-left: 14px;
  border-left: 4px solid var(--orange);
}

.single-post-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--text);
}

.single-post-content p { margin-bottom: 16px; font-size: 16px; line-height: 1.8; }

.single-post-content ul {
  margin: 0 0 20px 20px;
  padding: 0;
}

.single-post-content ul li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
}

.single-post-content .intro {
  font-size: 18px;
  color: #444;
  line-height: 1.75;
  border-left: 4px solid var(--orange);
  padding-left: 20px;
  margin-bottom: 28px;
  font-style: italic;
}

/* Product Banner */
.product-banner {
  display: flex;
  gap: 24px;
  background: #fffbf2;
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
  align-items: center;
}

.product-banner img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--white);
  padding: 8px;
  flex-shrink: 0;
}

.product-info { display: flex; flex-direction: column; gap: 10px; }

.product-info .price {
  font-size: 2rem;
  font-weight: 800;
  color: #B12704;
  font-family: var(--font-heading);
}

.product-info .rating {
  font-size: 15px;
  color: var(--gray);
}

.buy-btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white) !important;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: background 0.2s;
  width: fit-content;
}

.buy-btn:hover { background: var(--orange-dark); }

/* Pros Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.pros, .cons {
  padding: 20px;
  border-radius: 8px;
}

.pros { background: #f0fff4; border-left: 4px solid #22c55e; }
.cons { background: #fff5f5; border-left: 4px solid #ef4444; }
.pros h3 { color: #16a34a; margin-top: 0; margin-bottom: 12px; }
.cons h3 { color: #dc2626; margin-top: 0; margin-bottom: 12px; }

/* CTA Button */
.cta-btn {
  display: block;
  background: var(--orange);
  color: var(--white) !important;
  padding: 16px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 17px;
  text-align: center;
  margin: 32px 0;
  transition: background 0.2s, transform 0.1s;
}

.cta-btn:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

/* Post meta bar */
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #999;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.post-meta-bar .cat-badge {
  background: var(--orange);
  color: var(--white);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

/* =============================================
   FOOTER
============================================= */
#site-footer {
  background: var(--black);
  color: #aaa;
  margin-top: 60px;
  border-top: 3px solid var(--orange);
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo-name { font-size: 24px; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 13px; line-height: 1.7; color: #888; max-width: 300px; }

.footer-col h4 {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #888; font-size: 13px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid #222;
  padding: 20px 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
  flex-wrap: wrap;
  gap: 12px;
}

.affiliate-disclaimer {
  background: #1a1a1a;
  border-top: 1px solid #222;
  padding: 16px 24px;
  text-align: center;
  font-size: 11px;
  color: #555;
  line-height: 1.6;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  #main-content, .single-post-wrap { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-template-columns: 1fr; }
  .post-card.featured .post-card-image,
  .post-card.featured .post-card-image-placeholder { height: 220px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .product-banner { flex-direction: column; }
  .product-banner img { width: 100%; height: 220px; }
}

@media (max-width: 600px) {
  .header-inner { gap: 12px; }
  #site-nav { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .single-post-content { padding: 24px 18px; }
}
