/*
Theme Name: ilovepet
Theme URI: https://ilovepet.vn
Author: ilovepet.vn
Author URI: https://ilovepet.vn
Description: Theme affiliate SEO tối ưu cho ilovepet.vn — Shopee Pet Affiliate với 3 cluster chính: mèo, chó, sức khỏe thú cưng.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: ilovepet
Tags: affiliate, pets, seo, vietnamese, shopee
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --color-primary:    #e85d26;
  --color-primary-l:  #f47a45;
  --color-primary-d:  #c44d1a;
  --color-secondary:  #1a7f5a;
  --color-accent:     #fbbf24;
  --color-text:       #1a1a2e;
  --color-text-2:     #4a4a6a;
  --color-text-3:     #7a7a9a;
  --color-border:     #e5e7ef;
  --color-bg:         #ffffff;
  --color-bg-2:       #f8f9ff;
  --color-bg-3:       #f0f2fa;
  --color-shopee:     #ee4d2d;
  --color-shopee-d:   #cc3d1f;
  --font-body:        'Be Vietnam Pro', 'Segoe UI', system-ui, sans-serif;
  --font-mono:        'Space Mono', 'Courier New', monospace;
  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        16px;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:        0 8px 32px rgba(0,0,0,0.12);
  --max-width:        1100px;
  --content-width:    720px;
  --sidebar-width:    300px;
  --transition:       0.18s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-d); }
ul, ol { padding-left: 1.5em; }
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 0.6em;
}
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }
blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 12px 20px;
  background: var(--color-bg-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-2);
  margin: 1.5em 0;
}
table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 14px; }
th { background: var(--color-bg-3); font-weight: 600; color: var(--color-text); }
tr:hover { background: var(--color-bg-2); }
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-secondary);
}
pre {
  background: var(--color-text);
  color: #e8eaf0;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5em 0;
}
pre code { background: none; color: inherit; padding: 0; }

/* ==========================================================================
   Layout
   ========================================================================== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.site-content { padding: 32px 0 60px; }
.content-area { width: 100%; }
.has-sidebar .content-area { max-width: var(--content-width); }
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 40px;
  align-items: start;
}
@media (max-width: 1024px) { .layout-with-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .has-sidebar .content-area { max-width: 100%; } }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo img { height: 40px; width: auto; }
.site-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}
.site-logo-text span { color: var(--color-text); }

/* Navigation */
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; padding: 0; margin: 0; }
.main-nav ul li { position: relative; }
.main-nav ul li a {
  display: block;
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  border-radius: 999px;
  transition: all var(--transition);
}
.main-nav ul li a:hover { color: var(--color-primary); background: var(--color-bg-2); }
.main-nav ul li.current-menu-item > a { color: var(--color-primary); background: rgba(232,93,38,0.08); }
.main-nav ul li.current-menu-item > a::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
}
.main-nav ul li.menu-cat > a::before { content: '🐱 '; }
.main-nav ul li.menu-dog > a::before { content: '🐶 '; }
.main-nav ul li.menu-health > a::before { content: '💊 '; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--color-shopee) 0%, #ff7a45 100%);
  color: #fff !important;
  padding: 10px 22px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(238,77,45,0.3);
  transition: all var(--transition);
}
.header-cta:hover {
  background: linear-gradient(135deg, var(--color-shopee-d) 0%, var(--color-shopee) 100%) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(238,77,45,0.4);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--color-bg-2); }
@media (max-width: 768px) {
  .menu-toggle { display: flex; flex-direction: column; gap: 5px; }
  .menu-toggle span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: all var(--transition); }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border); padding: 16px 20px; box-shadow: var(--shadow-md); }
  .main-nav.active { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav ul li a { padding: 12px 16px; border-radius: var(--radius-sm); }
  .main-nav ul li.current-menu-item > a::after { display: none; }
}

/* Header actions (search btn + menu toggle) */
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-search-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: none; cursor: pointer;
  color: var(--color-text); transition: background var(--transition), color var(--transition);
}
.header-search-btn svg { width: 20px; height: 20px; }
.header-search-btn:hover { background: var(--color-bg-2); color: var(--color-primary); }
.header-search-btn[aria-expanded="true"] { background: rgba(232,93,38,.1); color: var(--color-primary); }

/* Search bar dropdown (fixed below sticky header) */
.header-search-bar {
  position: fixed; top: 68px; left: 0; right: 0; z-index: 99;
  background: #fff;
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 14px 0 16px;
  transform: translateY(-110%);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.header-search-bar.open { transform: translateY(0); pointer-events: auto; }
.header-search-form-inner { display: flex; align-items: center; gap: 8px; }
.header-search-bar input[type="search"] {
  flex: 1; padding: 11px 18px;
  border: 2px solid var(--color-border); border-radius: var(--radius-lg);
  font-size: 16px; font-family: var(--font-body); outline: none;
  background: var(--color-bg-2); transition: border-color .18s, background .18s;
  min-width: 0;
}
.header-search-bar input[type="search"]:focus { border-color: var(--color-primary); background: #fff; }
.header-search-bar .hs-submit {
  background: var(--color-primary); color: #fff; border: none;
  padding: 11px 24px; border-radius: var(--radius-lg);
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .18s;
}
.header-search-bar .hs-submit:hover { background: var(--color-primary-d); }
.header-search-bar .hs-close {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: none; cursor: pointer; flex-shrink: 0;
  color: var(--color-text-3); transition: background .15s, color .15s;
}
.header-search-bar .hs-close svg { width: 18px; height: 18px; }
.header-search-bar .hs-close:hover { background: var(--color-bg-3); color: var(--color-text); }
.header-search-bar .hero-search-tags { justify-content: flex-start; margin-top: 10px; }
@media (max-width: 640px) {
  .header-search-bar input[type="search"] { font-size: 15px; padding: 10px 14px; }
  .header-search-bar .hs-submit { padding: 10px 16px; font-size: 14px; }
}

/* ==========================================================================
   Hero / Breadcrumbs
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, #fff5f0 0%, #fff 60%);
  border-bottom: 1px solid var(--color-border);
  padding: 32px 0 24px;
}
.page-hero .entry-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.page-hero .entry-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--color-text-3); }
.page-hero .entry-meta a { color: var(--color-text-3); }
.page-hero .entry-meta a:hover { color: var(--color-primary); }
.cluster-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600;
  background: rgba(232,93,38,0.1); color: var(--color-primary);
}
.cluster-badge.cat { background: rgba(34,211,165,0.12); color: #16a085; }
.cluster-badge.dog { background: rgba(96,165,250,0.12); color: #2980b9; }
.cluster-badge.health { background: rgba(251,113,133,0.12); color: #e74c3c; }

.breadcrumbs {
  font-size: 13px;
  color: var(--color-text-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--color-text-3); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs .sep { color: var(--color-border); }

/* ==========================================================================
   Article Content
   ========================================================================== */
.entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
}
.entry-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text);
}
.entry-content h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: var(--color-primary-d);
}
.entry-content h4 { font-size: 1.05rem; margin-top: 1.5rem; }
.entry-content ul li, .entry-content ol li { margin-bottom: 6px; }
.entry-content img { border-radius: var(--radius-md); margin: 1.5em 0; }
.entry-content .wp-block-image figcaption { font-size: 13px; color: var(--color-text-3); text-align: center; margin-top: 6px; }
.entry-content a { font-weight: 500; text-decoration: underline; text-decoration-color: rgba(232,93,38,0.4); }
.entry-content a:hover { text-decoration-color: var(--color-primary); }

/* ==========================================================================
   Table of Contents
   ========================================================================== */
.toc-box {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 2rem 0;
}
.toc-box .toc-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-3);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toc-toggle { cursor: pointer; color: var(--color-primary); font-size: 12px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { padding: 3px 0; font-size: 14px; }
.toc-list li a { color: var(--color-text-2); font-weight: 500; }
.toc-list li a:hover { color: var(--color-primary); text-decoration: none; }
.toc-list li.toc-h3 { padding-left: 16px; font-size: 13px; }
.toc-list li.toc-h3::before { content: '↳ '; color: var(--color-text-3); }

/* ==========================================================================
   Product Box (Affiliate)
   ========================================================================== */
.product-box {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 1.75rem 0;
  background: var(--color-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  align-items: start;
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
  position: relative;
}
.product-box:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  transform: translateY(-3px);
  border-color: var(--color-primary);
}

/* image wrapper — needed for overflow:hidden zoom */
.product-box .product-img-wrap {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
}
.product-box .product-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.product-box:hover .product-img { transform: scale(1.07); }

/* placeholder when no image */
.product-box .product-img-placeholder {
  font-size: 3.2rem;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-2) 0%, var(--color-bg-3) 100%);
}

.product-box .product-info { flex: 1; min-width: 0; }
.product-box .product-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.4;
}
.product-box .product-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(232,93,38,.12); color: var(--color-primary);
  margin-bottom: 8px; letter-spacing: .3px;
}
.product-box .product-price {
  font-size: 1.25rem; font-weight: 800;
  color: var(--color-shopee); margin-bottom: 6px;
}
.product-box .product-price-old {
  font-size: 13px; color: var(--color-text-3);
  text-decoration: line-through; margin-left: 8px; font-weight: 400;
}
.product-box .product-stars { color: var(--color-accent); font-size: 14px; margin-bottom: 10px; letter-spacing: 2px; }
.product-box .product-desc {
  font-size: 13.5px; color: var(--color-text-2); margin-bottom: 16px; line-height: 1.65;
}
.product-box .btn-shopee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-shopee);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  transition: background .18s, transform .18s, box-shadow .18s;
  box-shadow: 0 3px 10px rgba(238,77,45,.35);
}
.product-box .btn-shopee:hover {
  background: var(--color-shopee-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(238,77,45,.45);
  color: #fff;
}
.product-box .btn-shopee svg { width: 16px; height: 16px; }

/* Accent left border for has-image variant */
.product-box.has-image {
  border-left: 3px solid var(--color-primary);
}

@media (max-width: 560px) {
  .product-box { grid-template-columns: 1fr; }
  .product-box .product-img-wrap { width: 100%; height: 200px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .product-box .product-img,
  .product-box .product-img-placeholder { width: 100%; height: 200px; }
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.comparison-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.comparison-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.comparison-table th {
  background: var(--color-primary);
  color: #fff;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.comparison-table th:first-child { background: var(--color-primary-d); }
.comparison-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--color-border); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: var(--color-bg-2); }
.comparison-table .best-pick { background: rgba(34,211,165,0.08); }
.comparison-table .best-pick td:first-child { font-weight: 700; color: var(--color-secondary); }
.ct-badge-best { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--color-secondary); color: #fff; vertical-align: middle; margin-left: 6px; }
.ct-check { color: var(--color-secondary); font-size: 16px; }
.ct-cross { color: #e74c3c; font-size: 16px; }
.ct-shopee-btn {
  display: inline-block;
  background: var(--color-shopee);
  color: #fff !important;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}
.ct-shopee-btn:hover { background: var(--color-shopee-d); }

/* ==========================================================================
   Pros/Cons Box
   ========================================================================== */
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 1.5rem 0; }
@media (max-width: 520px) { .pros-cons-grid { grid-template-columns: 1fr; } }
.pros-box, .cons-box { border-radius: var(--radius-md); padding: 16px 20px; }
.pros-box { background: rgba(34,211,165,0.08); border: 1px solid rgba(34,211,165,0.25); }
.cons-box { background: rgba(251,113,133,0.08); border: 1px solid rgba(251,113,133,0.25); }
.pros-box .box-title { color: #16a085; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.cons-box .box-title { color: #c0392b; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.pros-box ul, .cons-box ul { list-style: none; padding: 0; margin: 0; }
.pros-box ul li, .cons-box ul li { font-size: 14px; padding: 4px 0; padding-left: 20px; position: relative; }
.pros-box ul li::before { content: '✓'; position: absolute; left: 0; color: #16a085; font-weight: 700; }
.cons-box ul li::before { content: '✗'; position: absolute; left: 0; color: #c0392b; font-weight: 700; }

/* ==========================================================================
   Verdict Box
   ========================================================================== */
.verdict-box {
  background: linear-gradient(135deg, rgba(232,93,38,0.06) 0%, rgba(232,93,38,0.02) 100%);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 2rem 0;
}
.verdict-box .verdict-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--color-primary);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.verdict-box .verdict-text { font-size: 15px; font-weight: 600; color: var(--color-text); line-height: 1.6; }

/* ==========================================================================
   CTA Shopee Button
   ========================================================================== */
.cta-shopee-wrap { text-align: center; margin: 2rem 0; }
.btn-cta-shopee {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-shopee);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none !important;
  box-shadow: 0 4px 20px rgba(238,77,45,0.35);
  transition: all var(--transition);
}
.btn-cta-shopee:hover { background: var(--color-shopee-d); transform: translateY(-2px); box-shadow: 0 6px 28px rgba(238,77,45,0.45); }
.btn-cta-shopee-sm {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-shopee); color: #fff !important;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13px;
  text-decoration: none !important;
  transition: background var(--transition);
}
.btn-cta-shopee-sm:hover { background: var(--color-shopee-d); color: #fff; }


/* ==========================================================================
   Tip / Info Box
   ========================================================================== */
.tip-box {
  background: rgba(96,165,250,0.07);
  border-left: 4px solid #60a5fa;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  margin: 1.5rem 0;
  font-size: 14px;
  color: var(--color-text-2);
  line-height: 1.7;
}
.tip-box .tip-label { font-weight: 700; color: #2980b9; margin-bottom: 4px; font-size: 13px; }
.warning-box {
  background: rgba(251,191,36,0.08);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px; margin: 1.5rem 0;
  font-size: 14px; color: var(--color-text-2);
}

/* ==========================================================================
   Post Cards (Archive/Related)
   ========================================================================== */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin: 2rem 0; }
.post-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card .card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--color-bg-3); }
.post-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .card-thumb img { transform: scale(1.05); }
.post-card .card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.post-card .card-cluster { margin-bottom: 8px; }
.post-card .card-title { font-size: 15px; font-weight: 700; color: var(--color-text); margin-bottom: 10px; line-height: 1.4; flex: 1; }
.post-card .card-title a { color: inherit; }
.post-card .card-title a:hover { color: var(--color-primary); text-decoration: none; }
.post-card .card-meta { font-size: 12px; color: var(--color-text-3); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.post-card .card-excerpt { font-size: 13px; color: var(--color-text-2); margin-bottom: 14px; line-height: 1.6; }

/* ==========================================================================
   Category Hub Page
   ========================================================================== */
.cluster-hub {
  background: linear-gradient(135deg, var(--color-bg-2) 0%, #fff 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}
.cluster-hub .hub-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.cluster-hub .hub-icon { font-size: 2.5rem; }
.cluster-hub .hub-title { font-size: 1.5rem; font-weight: 800; color: var(--color-text); margin-bottom: 4px; }
.cluster-hub .hub-desc { font-size: 14px; color: var(--color-text-2); }
.cluster-hub .hub-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.hub-stat { font-size: 12px; padding: 4px 12px; border-radius: 99px; background: var(--color-bg-3); border: 1px solid var(--color-border); color: var(--color-text-2); }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar { position: sticky; top: 80px; }
.widget { margin-bottom: 28px; }
.widget-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-3); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.widget-popular-wrap { background: var(--color-bg-2); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 16px; }
.widget-popular-wrap .widget-title { color: var(--color-text); font-size: 14px; border-bottom-color: rgba(0,0,0,.08); margin-bottom: 10px; padding-bottom: 10px; }
.widget-popular li { border: none; }
.widget-popular .pop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; margin: 0 -8px;
  border-radius: var(--radius-md); text-decoration: none;
  transition: background .15s;
}
.widget-popular .pop-item:hover { background: #fff; }
.widget-popular .pop-rank {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}
.widget-popular .pop-rank-1 { background: var(--color-primary); color: #fff; }
.widget-popular .pop-rank-2 { background: #475569; color: #fff; }
.widget-popular .pop-rank-3 { background: #f59e0b; color: #fff; }
.widget-popular .pop-rank-rest { background: var(--color-bg-3); color: var(--color-text-3); }
.widget-popular .pop-body { flex: 1; min-width: 0; }
.widget-popular .pop-title {
  font-size: 13px; font-weight: 600; color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;
}
.widget-popular .pop-item:hover .pop-title { color: var(--color-primary); }
.widget-popular .pop-meta { font-size: 11px; color: var(--color-text-3); margin-top: 3px; }
.widget-popular .pop-thumb {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: var(--color-bg-3);
}
.widget-popular .pop-thumb img { width: 100%; height: 100%; object-fit: cover; }

.widget-cta-box {
  background: var(--color-shopee);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  text-align: center;
}
.widget-cta-box .wcta-title { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.widget-cta-box .wcta-desc { font-size: 13px; opacity: 0.9; margin-bottom: 14px; }
.widget-cta-box .btn-wcta {
  display: block; background: #fff; color: var(--color-shopee) !important;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; text-decoration: none !important;
  transition: transform var(--transition);
}
.widget-cta-box .btn-wcta:hover { transform: translateY(-1px); }

/* ── Categories widget ── */
.widget-cats-wrap { background: var(--color-bg-2); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 16px; }
.widget-cats-wrap .widget-title { color: var(--color-text); font-size: 14px; border-bottom-color: rgba(0,0,0,.08); margin-bottom: 10px; padding-bottom: 10px; }
.widget-cats-list { list-style: none; padding: 0; margin: 0; }
.widget-cats-item {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.widget-cats-item:last-child { border-bottom: none; }
.widget-cats-link {
  display: flex; align-items: center; gap: 8px;
  flex: 1; padding: 9px 6px; margin: 0 -6px;
  font-size: 14px; font-weight: 600; color: var(--color-text-2);
  text-decoration: none; border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.widget-cats-link:hover { color: var(--color-primary); background: #fff; }
.widget-cats-icon { font-size: 16px; line-height: 1; }
.widget-cats-count {
  font-size: 11px; font-weight: 700; color: var(--color-text-3);
  background: var(--color-bg-3); padding: 2px 8px; border-radius: 99px;
  flex-shrink: 0;
}

/* ── Generic / block-based widgets (Tìm kiếm, Bài viết mới, Bình luận gần đây…) ── */
.widget h2,
.widget h3,
.widget h4,
.widget .wp-block-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-3);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

/* Search block */
.widget .wp-block-search__label {
  display: block;
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-text-3);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.widget .wp-block-search__inside-wrapper {
  display: flex; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: border-color var(--transition);
  background: var(--color-bg);
}
.widget .wp-block-search__inside-wrapper:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(238,104,55,0.12); }
.widget .wp-block-search__input {
  flex: 1; border: none; padding: 10px 12px;
  font-size: 13px; font-family: var(--font-body);
  background: transparent; color: var(--color-text); outline: none;
  min-width: 0;
}
.widget .wp-block-search__button {
  flex-shrink: 0;
  background: var(--color-primary) !important; color: #fff !important;
  border: none !important; border-radius: 0 !important;
  padding: 0 14px; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: background var(--transition);
  white-space: nowrap;
}
.widget .wp-block-search__button:hover { background: var(--color-primary-d) !important; }
.widget .wp-block-search__button svg { fill: #fff; }

/* Latest Posts block */
.widget .wp-block-latest-posts,
.widget .wp-block-latest-posts__list {
  list-style: none; margin: 0; padding: 0;
}
.widget .wp-block-latest-posts li {
  padding: 0;
}
.widget .wp-block-latest-posts a.wp-block-latest-posts__post-title {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid var(--color-border);
  font-size: 13px; font-weight: 600; line-height: 1.4;
  color: var(--color-text); text-decoration: none;
  transition: color var(--transition);
}
.widget .wp-block-latest-posts a.wp-block-latest-posts__post-title::before {
  content: '›';
  display: inline-block; flex-shrink: 0;
  width: 16px; height: 16px; margin-top: 1px;
  background: var(--color-bg-3); border-radius: 4px;
  font-size: 14px; font-weight: 900; color: var(--color-primary);
  text-align: center; line-height: 16px;
}
.widget .wp-block-latest-posts li:last-child a.wp-block-latest-posts__post-title { border-bottom: none; }
.widget .wp-block-latest-posts a.wp-block-latest-posts__post-title:hover { color: var(--color-primary); }
.widget .wp-block-latest-posts a.wp-block-latest-posts__post-title:hover::before { background: var(--color-primary); color: #fff; }
.widget .wp-block-latest-posts__post-date {
  display: none;
}

/* Latest Comments block */
.widget .wp-block-latest-comments {
  list-style: none; margin: 0; padding: 0;
}
.widget .wp-block-latest-comments__comment {
  padding: 10px 0; border-bottom: 1px solid var(--color-border);
  font-size: 12px; line-height: 1.6; color: var(--color-text-3);
}
.widget .wp-block-latest-comments__comment:last-child { border-bottom: none; }
.widget .wp-block-latest-comments__comment-author {
  font-weight: 700; color: var(--color-primary);
}
.widget .wp-block-latest-comments__comment-link {
  color: var(--color-text-2); text-decoration: none; font-weight: 600;
  transition: color var(--transition);
}
.widget .wp-block-latest-comments__comment-link:hover { color: var(--color-primary); }
.widget .wp-block-latest-comments__comment-excerpt p {
  margin: 4px 0 0; font-size: 12px; color: var(--color-text-3);
}
.widget .wp-block-latest-comments__comment-date {
  display: block; font-size: 11px; color: var(--color-text-3); margin-top: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--color-text); color: rgba(255,255,255,0.7); padding: 48px 0 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .footer-logo { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; line-height: 1.7; max-width: 260px; }
.footer-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-disclaimer { background: rgba(255,255,255,0.05); border-radius: var(--radius-md); padding: 14px 18px; margin-top: 24px; font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.7; }

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section { margin: 2.5rem 0; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 8px; overflow: hidden; }
.faq-question {
  padding: 16px 20px; font-size: 15px; font-weight: 600; color: var(--color-text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; background: var(--color-bg); transition: background var(--transition);
  user-select: none;
}
.faq-question:hover { background: var(--color-bg-2); }
.faq-question .faq-icon { font-size: 18px; color: var(--color-primary); transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-question { background: var(--color-bg-2); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 20px 16px; font-size: 14px; color: var(--color-text-2); line-height: 1.8; border-top: 1px solid var(--color-border); padding-top: 16px; }
.faq-item.open .faq-answer { display: block; }

/* ==========================================================================
   Rating Stars
   ========================================================================== */
.star-rating { display: inline-flex; align-items: center; gap: 4px; }
.star-rating .stars { color: var(--color-accent); letter-spacing: 2px; font-size: 15px; }
.star-rating .score { font-weight: 700; font-size: 14px; color: var(--color-text); }
.star-rating .count { font-size: 12px; color: var(--color-text-3); }

/* ==========================================================================
   Reading Progress Bar
   ========================================================================== */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: transparent; z-index: 200;
}
.reading-progress-bar { height: 100%; background: var(--color-primary); width: 0%; transition: width 0.1s linear; }

/* ==========================================================================
   Related Posts
   ========================================================================== */
.related-posts { margin: 3rem 0; padding-top: 2rem; border-top: 2px solid var(--color-border); }
.related-posts .section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

/* ==========================================================================
   Author Box
   ========================================================================== */
.author-box {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--color-bg-2); border-radius: var(--radius-lg);
  padding: 24px; margin: 3rem 0; border: 1px solid var(--color-border);
}
.author-box .author-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box .author-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.author-box .author-bio { font-size: 13px; color: var(--color-text-2); line-height: 1.6; }
@media (max-width: 520px) { .author-box { flex-direction: column; } }

/* ==========================================================================
   Search
   ========================================================================== */
.search-form { display: flex; gap: 0; max-width: 400px; }
.search-form input[type="search"] {
  flex: 1; padding: 10px 16px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: 14px;
  font-family: var(--font-body); outline: none; background: var(--color-bg);
  transition: border-color var(--transition);
}
.search-form input[type="search"]:focus { border-color: var(--color-primary); }
.search-form button {
  background: var(--color-primary); color: #fff; border: none;
  padding: 10px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer; font-size: 14px; transition: background var(--transition);
}
.search-form button:hover { background: var(--color-primary-d); }

/* Hero search */
.hero-search-wrap { margin-top: 32px; }
.hero-search-form { max-width: 620px; margin: 0 auto; }
.hero-search-inner {
  display: flex; align-items: center;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.hero-search-inner:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 4px 24px rgba(232,93,38,.18);
}
.hero-search-icon { padding: 0 4px 0 20px; font-size: 20px; line-height: 1; flex-shrink: 0; }
.hero-search-input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 16px 10px; font-size: 16px; font-family: var(--font-body);
  color: var(--color-text); min-width: 0;
}
.hero-search-input::placeholder { color: var(--color-text-3); }
.hero-search-btn {
  background: var(--color-primary); color: #fff; border: none;
  padding: 11px 26px; margin: 5px; border-radius: 50px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .18s, transform .15s;
  white-space: nowrap; flex-shrink: 0;
}
.hero-search-btn:hover { background: var(--color-primary-d); transform: translateY(-1px); }
.hero-search-tags {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; margin-top: 14px;
}
.hero-search-tag {
  font-size: 13px; padding: 5px 14px; border-radius: 50px;
  background: rgba(232,93,38,.07); color: var(--color-primary);
  border: 1px solid rgba(232,93,38,.2); font-weight: 500;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.hero-search-tag:hover { background: var(--color-primary); color: #fff; border-color: transparent; }
@media (max-width: 640px) {
  .hero-search-input { font-size: 15px; padding: 14px 8px; }
  .hero-search-btn { padding: 9px 18px; font-size: 14px; }
  .hero-search-icon { padding-left: 14px; }
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination { margin: 3rem 0; }
.pagination .nav-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 6px;
}
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  font-size: 14px; font-weight: 500; color: var(--color-text-2);
  text-decoration: none !important; transition: all var(--transition);
}
.pagination .page-numbers:not(.dots) { padding: 0 12px; }
.pagination a.page-numbers:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .page-numbers.dots { border-color: transparent; cursor: default; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.affiliate-disclosure {
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.3);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 12px; color: var(--color-text-3); margin-bottom: 1.5rem;
}
.affiliate-disclosure a { color: var(--color-text-3); text-decoration: underline; }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area { margin-top: 3rem; }

.comments-title,
.comment-reply-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-reply-title small a {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-shopee);
  margin-left: 10px;
  text-decoration: none;
}
.comment-reply-title small a:hover { text-decoration: underline; }

/* ── Comment list ─────────────────────────────────────────────────── */
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 24px; }

.comment-list .comment-body {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 20px;
  margin-bottom: 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.comment-list .comment-body:hover { box-shadow: var(--shadow-md); }

.comment-list .comment-author .avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--color-bg-3);
  grid-row: span 2;
}
.comment-list .comment-author {
  display: contents;
}
.comment-list .comment-author .fn {
  font-style: normal;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
  grid-column: 2;
}
.comment-list .says { display: none; }

.comment-list .comment-metadata {
  grid-column: 2;
  font-size: 12px;
  margin-top: -2px;
}
.comment-list .comment-metadata a {
  color: var(--color-text-3);
  text-decoration: none;
}
.comment-list .comment-metadata a:hover { color: var(--color-primary); }

.comment-list .comment-content {
  grid-column: 2;
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-text-2);
  line-height: 1.7;
}
.comment-list .comment-content p:last-child { margin-bottom: 0; }
.comment-list .comment-content p { margin-bottom: 8px; }

.comment-list .reply {
  grid-column: 2;
  margin-top: 10px;
}
.comment-list .comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: 99px;
  padding: 4px 14px;
  transition: all var(--transition);
}
.comment-list .comment-reply-link:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Pingback / trackback */
.comment-list .pingback,
.comment-list .trackback {
  padding: 12px 16px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 13px;
}
.comment-list .pingback .comment-body,
.comment-list .trackback .comment-body {
  display: block; padding: 0; border: none; box-shadow: none; margin: 0;
}

@media (max-width: 520px) {
  .comment-list .comment-body { grid-template-columns: 44px 1fr; gap: 10px; padding: 14px; }
  .comment-list .comment-author .avatar { width: 44px; height: 44px; }
  .comment-list .children { padding-left: 12px; }
}

/* ── Comment form ─────────────────────────────────────────────────── */
.comment-respond {
  background: linear-gradient(180deg, var(--color-bg-2) 0%, var(--color-bg) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.comment-respond::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

.comment-notes {
  font-size: 13px;
  color: var(--color-text-3);
  margin-bottom: 1.25rem;
}
.comment-notes .required,
#commentform .required {
  color: var(--color-shopee);
  font-weight: 700;
}

#commentform { display: flex; flex-wrap: wrap; gap: 0 16px; }

#commentform p { width: 100%; margin-bottom: 16px; }

#commentform label {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--color-text);
  margin-bottom: 6px;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform input[type="password"],
#commentform textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
#commentform textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

#commentform input:focus,
#commentform textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(232,93,38,0.12);
}
#commentform input::placeholder,
#commentform textarea::placeholder { color: var(--color-text-3); opacity: .8; }

/* Two-column layout for author / email on desktop */
.comment-form-comment { order: 1; }
.comment-form-author  { order: 2; }
.comment-form-email   { order: 3; }
.comment-form-url     { order: 4; }
.comment-form-cookies-consent { order: 5; }
.form-submit          { order: 6; margin-bottom: 0 !important; }

@media (min-width: 600px) {
  .comment-form-author,
  .comment-form-email,
  .comment-form-url { width: calc(33.333% - 11px); }
  .comment-form-author  { margin-right: 16px; }
  .comment-form-email   { margin-right: 16px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .comment-form-author { width: calc(50% - 8px); }
  .comment-form-email  { width: calc(50% - 8px); margin-right: 0; }
  .comment-form-url    { width: 100%; }
}

/* Cookies consent checkbox */
.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-2);
}
.comment-form-cookies-consent input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer;
}
.comment-form-cookies-consent label { margin: 0; font-weight: 400; cursor: pointer; }

/* Submit button */
.btn-comment-submit,
#commentform input#submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff !important;
  border: none;
  padding: 13px 32px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(232,93,38,0.3);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-comment-submit:hover,
#commentform input#submit:hover {
  background: var(--color-primary-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,93,38,0.4);
}
.btn-comment-submit::after { content: '→'; }

.no-comments {
  text-align: center;
  padding: 16px;
  color: var(--color-text-3);
  font-size: 14px;
  background: var(--color-bg-2);
  border-radius: var(--radius-md);
}

/* Comments pagination (older/newer comments) */
.comment-navigation { display: flex; justify-content: space-between; gap: 6px; margin: 1.5rem 0; flex-wrap: wrap; }
.comment-navigation .nav-previous a,
.comment-navigation .nav-next a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); font-size: 13px; font-weight: 600;
  color: var(--color-text-2); text-decoration: none !important;
  transition: all var(--transition);
}
.comment-navigation .nav-previous a:hover,
.comment-navigation .nav-next a:hover {
  border-color: var(--color-primary); color: var(--color-primary);
}
