/*
Theme Name: Blog do Mol
Theme URI: https://github.com/
Author: Mol
Description: Um tema WordPress clássico, minimalista, ultra leve e focado na melhor experiência de leitura.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.5
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: blogdomol
Tags: blog, clean, minimal, responsive-layout, dark-mode
*/

/* ==========================================================================
   Color Palette Variables (Light & Dark Mode Architecture)
   ========================================================================== */

/* 1. Light Mode (Default & Explicit [data-theme="light"]) */
:root,
html[data-theme="light"] {
  --bg: #fcfbf8;
  --text: #1c1b18;
  --text-muted: #6e6960;
  --border: #e6e2da;
  --accent: #b8860b;
  --accent-hover: #9e7204;
  --code-bg: #f3efe6;
  --btn-bg: #1c1b18;
  --btn-color: #fcfbf8;
  --btn-border: #1c1b18;
  --btn-hover-bg: #2e2c27;
  --btn-hover-border: #b8860b;
  --card-bg: #ffffff;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-serif: "Georgia", Cambria, "Times New Roman", Times, serif;
  --font-mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --container-width: 1200px;
  --line-height: 1.75;
}

/* 2. System Preference Fallback (when no explicit light theme is locked) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181817;
    --text: #ede9e3;
    --text-muted: #999388;
    --border: #2e2d2a;
    --accent: #e5b758;
    --accent-hover: #f5cb6c;
    --code-bg: #222220;
    --btn-bg: #242422;
    --btn-color: #ede9e3;
    --btn-border: #383632;
    --btn-hover-bg: #2e2d29;
    --btn-hover-border: #e5b758;
    --card-bg: #1f1f1d;
  }
}

/* 3. Explicit Dark Mode Override ([data-theme="dark"]) */
html[data-theme="dark"] {
  --bg: #181817;
  --text: #ede9e3;
  --text-muted: #999388;
  --border: #2e2d2a;
  --accent: #e5b758;
  --accent-hover: #f5cb6c;
  --code-bg: #222220;
  --btn-bg: #242422;
  --btn-color: #ede9e3;
  --btn-border: #383632;
  --btn-hover-bg: #2e2d29;
  --btn-hover-border: #e5b758;
  --card-bg: #1f1f1d;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--bg);
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--text);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: var(--line-height);
  font-size: 1.0625rem;
  padding: 1.5rem 1.25rem 3.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:visited {
  color: var(--accent);
}

a:hover,
a:focus {
  color: var(--accent-hover);
}

.site-wrapper {
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Header */
.site-header {
  margin-bottom: 2rem;
}

.site-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.site-branding {
  margin-bottom: 0;
}

.site-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-description {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Header Actions (Theme Toggle & Search) */
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Theme Toggle Button (Light / Dark Switcher) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--code-bg);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg) scale(1.06);
}

.theme-toggle-btn .theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* When in Light Mode (Default or html[data-theme="light"]): Show Moon icon */
:root .theme-icon-sun,
html[data-theme="light"] .theme-icon-sun {
  display: none;
}

:root .theme-icon-moon,
html[data-theme="light"] .theme-icon-moon {
  display: flex;
}

/* When in Dark Mode: Show Sun icon */
html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: flex;
  color: var(--accent);
}

/* Media Query Dark Mode Fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-moon {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-icon-sun {
    display: flex;
    color: var(--accent);
  }
}

.site-header-search {
  flex-shrink: 0;
}

.site-header-search .search-form {
  display: flex;
  align-items: center;
  position: relative;
}

.site-header-search .search-form label {
  margin-bottom: 0;
}

.site-header-search .search-form input[type="search"] {
  width: 180px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: width 0.25s ease, border-color 0.2s ease;
}

.site-header-search .search-form input[type="search"]:focus {
  width: 220px;
  border-color: var(--accent);
}

.site-header-search .search-form input[type="submit"],
.site-header-search .search-form .search-submit {
  display: none;
}

/* Header Navigation & Cart Bar */
.header-nav-wrapper {
  margin-top: 0.85rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-navigation {
  flex: 1;
  text-align: center;
}

.header-navigation ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.header-navigation a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s ease;
}

.header-navigation a:hover,
.header-navigation .current-menu-item > a,
.header-navigation .current_page_item > a,
.header-navigation .current_page_parent > a,
.header-navigation .current-menu-parent > a,
.header-navigation .current-menu-ancestor > a {
  color: var(--accent);
  font-weight: 600;
}

/* Header Shopping Cart Icon (Aligned Right) */
.header-cart-wrapper {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  z-index: 10;
}

.header-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--code-bg);
  transition: all 0.2s ease;
}

.header-cart-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.header-cart-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.header-cart-icon-svg svg {
  display: block;
}

.header-cart-count {
  background-color: var(--accent);
  color: #181817;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 4px;
  display: inline-block;
}

/* Layout with Left and Right Columns */
.site-body-layout {
  display: flex;
  gap: 2.75rem;
  align-items: flex-start;
}

/* Left Sidebar Menu */
.site-sidebar {
  width: 210px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  border-right: 1px solid var(--border);
  padding-right: 2rem;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu li {
  margin-bottom: 0.6rem;
}

.sidebar-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  display: block;
  padding: 0.2rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar-menu a:hover,
.sidebar-menu .current-menu-item > a,
.sidebar-menu .current_page_item > a,
.sidebar-menu .current_page_parent > a,
.sidebar-menu .current-menu-parent > a,
.sidebar-menu .current-menu-ancestor > a {
  color: var(--accent);
  font-weight: 600;
}

.sidebar-menu .children,
.sidebar-menu .sub-menu {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.4rem;
}

.sidebar-widgets {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.sidebar-widgets .widget {
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.sidebar-widgets .widget-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.sidebar-widgets ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widgets li {
  margin-bottom: 0.4rem;
}

.sidebar-widgets a {
  color: var(--text);
  text-decoration: none;
}

.sidebar-widgets a:hover {
  color: var(--accent);
}

/* Main Content */
.site-main {
  flex: 1;
  min-width: 0;
  min-height: 50vh;
}

/* Right Sidebar: Table of Contents (TOC) for Single/Page */
.site-toc-sidebar {
  width: 210px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  font-size: 0.875rem;
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

.toc-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-item {
  margin-bottom: 0.35rem;
}

.toc-item.toc-h1,
.toc-item.toc-h2 {
  font-size: 0.85rem;
}

.toc-item.toc-h3 {
  padding-left: 0.75rem;
  font-size: 0.8rem;
}

.toc-item.toc-h4 {
  padding-left: 1.25rem;
  font-size: 0.75rem;
}

.toc-item a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  line-height: 1.45;
  padding: 0.2rem 0;
  transition: all 0.2s ease;
}

.toc-item a:hover {
  color: var(--text);
}

.toc-item a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Right Sidebar: General / Home Page Column */
.site-sidebar-right {
  width: 210px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  font-size: 0.875rem;
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

.site-sidebar-right .widget {
  margin-bottom: 2rem;
}

.site-sidebar-right .widget-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.site-sidebar-right ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-sidebar-right li {
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.site-sidebar-right a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-sidebar-right a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Front Page (Home) Layout & Hero Posts Grid
   ========================================================================== */
.site-body-layout.is-full-width-layout,
.site-body-layout.is-front-page-layout {
  display: block;
  gap: 0;
}

.site-main.site-main-full {
  width: 100%;
  max-width: 100%;
  flex: none;
}

.front-page-container {
  width: 100%;
}

/* Hero Section */
.hero-posts-section {
  margin-bottom: 3.5rem;
}

.hero-posts-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 2.25rem;
  align-items: start;
}

/* Main Featured Card (Left) */
.hero-main-card {
  display: flex;
  flex-direction: column;
}

.hero-main-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
}

.hero-main-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.hero-main-thumb:hover img {
  transform: scale(1.03);
}

.hero-main-body {
  margin-top: 1rem;
}

.hero-main-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}

.hero-main-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-main-title a:hover {
  color: var(--accent);
}

.hero-main-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-main-meta .hero-category a {
  color: var(--accent);
  margin-left: 0.35rem;
}

/* Right Column (Stack + Ad) */
.hero-right-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Stack of 4 Secondary Cards (Right) */
.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* Hero Side Ad */
.hero-side-ad-wrapper {
  margin-top: 0.25rem;
  width: 100%;
}

.hero-side-ad-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-side-ad-content .ad-widget {
  width: 100%;
  display: flex;
  justify-content: center;
}

.ad-placeholder-box-sm {
  min-height: 70px;
  padding: 0.75rem 1rem;
}

.ad-placeholder-box-sm .ad-placeholder-icon {
  font-size: 1.35rem;
}

.ad-placeholder-box-sm .ad-placeholder-text strong {
  font-size: 0.85rem;
}

.ad-placeholder-box-sm .ad-placeholder-text span {
  font-size: 0.75rem;
}

.hero-side-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.hero-side-thumb {
  flex-shrink: 0;
  width: 135px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
}

.hero-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.hero-side-thumb:hover img {
  transform: scale(1.05);
}

.hero-side-body {
  flex: 1;
  min-width: 0;
}

.hero-side-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-side-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-side-title a:hover {
  color: var(--accent);
}

.hero-side-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Thumbnail Placeholder */
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--code-bg);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.thumb-placeholder-sm {
  font-size: 0.75rem;
  padding: 0.5rem;
}

/* Home Recent Posts Section */
.home-recent-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.home-section-header {
  margin-bottom: 1.75rem;
}

.home-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-section-title .section-icon {
  font-size: 1.15rem;
}

.home-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.home-post-card {
  display: flex;
  flex-direction: column;
}

.home-post-thumb {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  margin-bottom: 0.85rem;
}

.home-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.home-post-thumb:hover img {
  transform: scale(1.04);
}

.home-post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.home-post-category a {
  color: var(--accent);
  margin-left: 0.35rem;
}

.home-post-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.home-post-title a {
  color: var(--text);
  text-decoration: none;
}

.home-post-title a:hover {
  color: var(--accent);
}

.home-post-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.home-more-btn-container {
  margin-top: 3rem;
  text-align: center;
}

.home-more-btn {
  padding: 0.75rem 1.85rem;
}

/* ==========================================================================
   Blog Top Ad Area (Publicidade)
   ========================================================================== */

.blog-top-ad-wrapper {
  margin-bottom: 2.5rem;
  width: 100%;
  text-align: center;
}

.ad-disclaimer {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
  text-align: center;
}

.blog-top-ad-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

.blog-top-ad-content .ad-widget {
  width: 100%;
  display: flex;
  justify-content: center;
}

.blog-ad-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
  transition: opacity 0.2s ease;
}

.blog-ad-img:hover {
  opacity: 0.92;
}

/* Ad Placeholder Slot when empty */
.ad-placeholder-box {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
  background-color: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.ad-placeholder-box:hover {
  border-color: var(--accent);
}

.ad-placeholder-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: left;
}

.ad-placeholder-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.ad-placeholder-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ad-placeholder-text strong {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
}

.ad-placeholder-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .ad-placeholder-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Blog Featured Post Card (Hero Banner)
   ========================================================================== */

.blog-featured-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 3.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.blog-featured-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.blog-featured-thumb {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 420px;
  background-color: var(--code-bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.blog-featured-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-featured-card:hover .blog-featured-thumb img {
  transform: scale(1.025);
}

.blog-featured-body {
  padding: 2rem 2.25rem 2.25rem;
}

.blog-featured-top-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.blog-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(184, 134, 11, 0.12);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

html[data-theme="dark"] .blog-featured-badge {
  background: rgba(229, 183, 88, 0.15);
}

.blog-featured-category a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.blog-featured-category a:hover {
  text-decoration: underline;
}

.blog-featured-title {
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}

.blog-featured-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-featured-title a:hover {
  color: var(--accent);
}

.blog-featured-excerpt {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.blog-featured-excerpt p:last-child {
  margin-bottom: 0;
}

.blog-featured-action {
  display: flex;
  align-items: center;
}

.blog-featured-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  background-color: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.blog-featured-btn:hover {
  background-color: var(--btn-hover-bg);
  border-color: var(--btn-hover-border);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Feed Section Header */
.blog-feed-header {
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.blog-feed-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .blog-featured-thumb {
    aspect-ratio: 16 / 9;
  }

  .blog-featured-body {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .blog-featured-excerpt {
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
  }

  .blog-featured-btn {
    width: 100%;
    text-align: center;
  }
}

/* Post list */
.post-list {
  list-style: none;
}

.post-item {
  margin-bottom: 2.5rem;
}

.post-item-title {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.post-item-title a {
  color: var(--text);
  text-decoration: none;
}

.post-item-title a:hover {
  color: var(--accent);
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.post-meta a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-meta a:visited {
  color: var(--accent);
}

.post-meta a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.post-meta span + span::before {
  content: " • ";
  margin: 0 0.25rem;
}

.post-excerpt {
  color: var(--text);
  font-size: 1rem;
}

/* Single Post / Page */
.entry-header {
  margin-bottom: 2rem;
}

.entry-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.entry-thumbnail {
  margin-bottom: 2rem;
}

.entry-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

.entry-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: var(--accent-hover);
}

/* Lists & Indentation (Numbered and Bullet Lists) */
.entry-content ul,
.entry-content ol,
.comment-content ul,
.comment-content ol,
.bbp-topic-content ul,
.bbp-topic-content ol,
.bbp-reply-content ul,
.bbp-reply-content ol,
.wp-block-list {
  margin-top: 1.25rem;
  margin-bottom: 1.75rem;
  padding-left: 2.75rem;
}

.entry-content ol,
.comment-content ol,
.bbp-topic-content ol,
.bbp-reply-content ol {
  padding-left: 3rem;
}

.entry-content li,
.comment-content li,
.bbp-topic-content li,
.bbp-reply-content li,
.wp-block-list li {
  margin-bottom: 0.65rem;
  padding-left: 0.4rem;
  line-height: 1.75;
}

.entry-content li::marker,
.comment-content li::marker,
.bbp-topic-content li::marker,
.bbp-reply-content li::marker,
.wp-block-list li::marker {
  color: var(--accent);
  font-weight: 600;
}

/* Nested lists with progressive tab indent */
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul,
.comment-content ul ul,
.comment-content ol ol,
.bbp-topic-content ul ul,
.bbp-topic-content ol ol,
.bbp-reply-content ul ul,
.bbp-reply-content ol ol {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  padding-left: 2rem;
}

.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   Tables & Gutenberg Table Blocks
   ========================================================================== */
.entry-content table,
.comment-content table,
.wp-block-table table,
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--bg);
}

.wp-block-table {
  margin: 2rem 0;
  overflow-x: auto;
  border: none;
}

.entry-content th,
.wp-block-table th,
thead th,
th {
  background-color: var(--code-bg);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--border);
}

.entry-content td,
.wp-block-table td,
td {
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr {
  background-color: transparent;
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: rgba(229, 183, 88, 0.05);
}

/* Gutenberg Table Stripes (Zebra) */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
.wp-block-table.is-style-stripes tr:nth-child(2n+1),
.table-striped tbody tr:nth-child(odd),
table.is-style-stripes tbody tr:nth-child(odd) {
  background-color: var(--code-bg) !important;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
.wp-block-table.is-style-stripes tr:nth-child(2n+1) td,
.table-striped tbody tr:nth-child(odd) td,
table.is-style-stripes tbody tr:nth-child(odd) td {
  color: var(--text) !important;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(even),
.wp-block-table.is-style-stripes tr:nth-child(2n),
.table-striped tbody tr:nth-child(even),
table.is-style-stripes tbody tr:nth-child(even) {
  background-color: transparent !important;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(even) td,
.wp-block-table.is-style-stripes tr:nth-child(2n) td,
.table-striped tbody tr:nth-child(even) td,
table.is-style-stripes tbody tr:nth-child(even) td {
  color: var(--text) !important;
}

.wp-block-table.is-style-stripes th,
.wp-block-table.is-style-stripes td {
  border: 1px solid var(--border) !important;
}

tfoot {
  background-color: var(--code-bg);
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Enhanced Code Blocks & Floating Copy Button
   ========================================================================== */
.code-block-wrapper {
  position: relative;
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--code-bg);
}

.code-copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: var(--btn-bg);
  color: var(--text-muted);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.75;
  transition: all 0.2s ease;
}

.code-block-wrapper:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background-color: var(--btn-hover-bg);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.code-copy-btn .copy-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.code-copy-btn.copied {
  background-color: #1b3820;
  border-color: #2e5936;
  color: #a5d6a7;
  opacity: 1;
}

.entry-content pre,
.comment-content pre {
  margin: 0;
  padding: 1.25rem 3.5rem 1.25rem 1.4rem;
  background: transparent;
  border: none;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
  tab-size: 2;
  -moz-tab-size: 2;
  white-space: pre-wrap;
  word-break: break-word;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.entry-content pre code,
.comment-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  display: block;
}

/* Inline code formatting */
.entry-content :not(pre) > code,
.comment-content :not(pre) > code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  color: var(--accent);
  padding: 0.18em 0.45em;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--border);
}

/* Scrollbar styling for code blocks */
.entry-content pre::-webkit-scrollbar,
.comment-content pre::-webkit-scrollbar {
  height: 6px;
}

.entry-content pre::-webkit-scrollbar-track,
.comment-content pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.entry-content pre::-webkit-scrollbar-thumb,
.comment-content pre::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.entry-content pre::-webkit-scrollbar-thumb:hover,
.comment-content pre::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.entry-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.entry-tags a {
  background: var(--code-bg);
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.entry-tags a:hover {
  color: var(--accent);
}

/* Related Posts Cards */
.related-posts-section {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.related-posts-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.related-post-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.related-post-thumb {
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: var(--code-bg);
}

.related-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}

.related-post-body {
  padding: 0.85rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.related-post-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.related-post-card-title a {
  color: var(--text);
  text-decoration: none;
}

.related-post-card-title a:hover {
  color: var(--accent);
}

/* Post Navigation (Next / Previous) */
.post-navigation {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  display: flex;
  align-items: center;
}

.post-navigation .nav-next {
  margin-left: auto;
}

.post-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  padding: 0.5rem 1.15rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.post-navigation a:hover {
  background-color: var(--btn-hover-bg);
  border-color: var(--btn-hover-border);
  color: var(--btn-color);
  transform: translateY(-1px);
}

/* Pagination */
.pagination,
.posts-navigation {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
}

.nav-links a,
.nav-links .current {
  padding: 0.45rem 0.95rem;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-links a {
  background-color: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.nav-links a:hover {
  background-color: var(--btn-bg);
  border-color: var(--btn-border);
  color: var(--btn-color);
}

.nav-links .current {
  background-color: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
}

/* Blog Page & Archive Headers */
.blog-page-header,
.archive-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.blog-page-title,
.archive-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.blog-intro-content,
.archive-description {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Comments */
.comments-area {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  margin-bottom: 2.5rem;
}

.comment-list .comment {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.comment-author .fn {
  font-weight: 600;
  color: var(--text);
  font-style: normal;
}

.comment-content {
  font-size: 0.95rem;
}

.reply {
  margin-top: 0.5rem;
}

.comments-area a,
.comment-respond a,
.logged-in-as a,
.reply a {
  color: var(--accent);
  text-decoration: none;
}

.comments-area a:visited,
.comment-respond a:visited,
.logged-in-as a:visited,
.reply a:visited {
  color: var(--accent);
}

.comments-area a:hover,
.comment-respond a:hover,
.logged-in-as a:hover,
.reply a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Comment Form & Inputs */
.comment-respond {
  margin-top: 2rem;
}

.comment-reply-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.comment-form p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   Global Standard Form Inputs & Controls (Unified 48px Height Architecture)
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"]:not(.site-header-search input),
input[type="tel"],
input[type="number"],
input[type="date"],
select,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.contact-custom-form input[type="text"],
.contact-custom-form input[type="email"],
.contact-custom-form input[type="tel"],
#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form input[type="password"],
#bbpress-forums fieldset.bbp-form select,
#bbpress-forums input[type="text"],
#bbpress-forums select,
.woocommerce input.input-text,
.woocommerce select {
  width: 100%;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0.75rem 1rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background-color: var(--card-bg, #ffffff) !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Combobox (Select) Dropdown arrow */
select,
#bbpress-forums select,
.woocommerce select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23736e65' d='M6 7.4L0.6 2 2 0.6l4 4 4-4L11.4 2z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  padding-right: 2.5rem !important;
  cursor: pointer;
}

/* Multi-Line Textareas */
textarea,
.comment-form textarea,
.contact-custom-form textarea {
  width: 100%;
  padding: 0.85rem 1rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background-color: var(--card-bg, #ffffff) !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Global Focus States */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus,
.contact-custom-form input:focus,
.contact-custom-form textarea:focus,
#bbpress-forums fieldset.bbp-form input:focus,
#bbpress-forums fieldset.bbp-form select:focus,
#bbpress-forums input[type="text"]:focus,
#bbpress-forums select:focus,
.woocommerce input.input-text:focus,
.woocommerce select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15) !important;
}

/* Dark Mode Global Form Inputs & Comboboxes */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .comment-form input,
html[data-theme="dark"] .comment-form textarea,
html[data-theme="dark"] .contact-custom-form input,
html[data-theme="dark"] .contact-custom-form textarea,
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form input[type="text"],
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form input[type="password"],
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form select,
html[data-theme="dark"] #bbpress-forums input[type="text"],
html[data-theme="dark"] #bbpress-forums select,
html[data-theme="dark"] .woocommerce input.input-text,
html[data-theme="dark"] .woocommerce select {
  background-color: var(--code-bg) !important;
  border-color: #383632 !important;
  color: var(--text) !important;
}

html[data-theme="dark"] select,
html[data-theme="dark"] #bbpress-forums select,
html[data-theme="dark"] .woocommerce select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999388' d='M6 7.4L0.6 2 2 0.6l4 4 4-4L11.4 2z'/%3E%3C/svg%3E") !important;
}

html[data-theme="dark"] input[type="text"]:focus,
html[data-theme="dark"] input[type="email"]:focus,
html[data-theme="dark"] input[type="url"]:focus,
html[data-theme="dark"] input[type="password"]:focus,
html[data-theme="dark"] input[type="search"]:focus,
html[data-theme="dark"] input[type="tel"]:focus,
html[data-theme="dark"] input[type="number"]:focus,
html[data-theme="dark"] input[type="date"]:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .comment-form input:focus,
html[data-theme="dark"] .comment-form textarea:focus,
html[data-theme="dark"] .contact-custom-form input:focus,
html[data-theme="dark"] .contact-custom-form textarea:focus,
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form input:focus,
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form select:focus,
html[data-theme="dark"] #bbpress-forums input[type="text"]:focus,
html[data-theme="dark"] #bbpress-forums select:focus,
html[data-theme="dark"] .woocommerce input.input-text:focus,
html[data-theme="dark"] .woocommerce select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type="text"],
  :root:not([data-theme="light"]) input[type="email"],
  :root:not([data-theme="light"]) input[type="url"],
  :root:not([data-theme="light"]) input[type="password"],
  :root:not([data-theme="light"]) input[type="tel"],
  :root:not([data-theme="light"]) input[type="number"],
  :root:not([data-theme="light"]) input[type="date"],
  :root:not([data-theme="light"]) select,
  :root:not([data-theme="light"]) textarea,
  :root:not([data-theme="light"]) .comment-form input,
  :root:not([data-theme="light"]) .comment-form textarea,
  :root:not([data-theme="light"]) .contact-custom-form input,
  :root:not([data-theme="light"]) .contact-custom-form textarea,
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form input[type="text"],
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form input[type="password"],
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form select,
  :root:not([data-theme="light"]) #bbpress-forums input[type="text"],
  :root:not([data-theme="light"]) #bbpress-forums select,
  :root:not([data-theme="light"]) .woocommerce input.input-text,
  :root:not([data-theme="light"]) .woocommerce select {
    background-color: var(--code-bg) !important;
    border-color: #383632 !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) select,
  :root:not([data-theme="light"]) #bbpress-forums select,
  :root:not([data-theme="light"]) .woocommerce select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999388' d='M6 7.4L0.6 2 2 0.6l4 4 4-4L11.4 2z'/%3E%3C/svg%3E") !important;
  }

  :root:not([data-theme="light"]) input[type="text"]:focus,
  :root:not([data-theme="light"]) input[type="email"]:focus,
  :root:not([data-theme="light"]) input[type="url"]:focus,
  :root:not([data-theme="light"]) input[type="password"]:focus,
  :root:not([data-theme="light"]) input[type="search"]:focus,
  :root:not([data-theme="light"]) input[type="tel"]:focus,
  :root:not([data-theme="light"]) input[type="number"]:focus,
  :root:not([data-theme="light"]) input[type="date"]:focus,
  :root:not([data-theme="light"]) select:focus,
  :root:not([data-theme="light"]) textarea:focus,
  :root:not([data-theme="light"]) .comment-form input:focus,
  :root:not([data-theme="light"]) .comment-form textarea:focus,
  :root:not([data-theme="light"]) .contact-custom-form input:focus,
  :root:not([data-theme="light"]) .contact-custom-form textarea:focus,
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form input:focus,
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form select:focus,
  :root:not([data-theme="light"]) #bbpress-forums input[type="text"]:focus,
  :root:not([data-theme="light"]) #bbpress-forums select:focus,
  :root:not([data-theme="light"]) .woocommerce input.input-text:focus,
  :root:not([data-theme="light"]) .woocommerce select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
  }
}

/* ==========================================================================
   Global Form Standards: Unified Labels & Inputs Architecture
   ========================================================================== */

/* Form Labels - Balanced Spacing Directly Above Inputs (~8-9px) */
label,
.contact-custom-form label,
.comment-form label,
#bbpress-forums fieldset.bbp-form label,
#bbpress-forums label,
.woocommerce form .form-row label,
.woocommerce-form label {
  display: block !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin-top: 0 !important;
  margin-bottom: 0.55rem !important;
  color: var(--text) !important;
  line-height: 1.3 !important;
}

/* Eliminate archaic <br> tags inserted by bbPress/WordPress between label and input */
#bbpress-forums fieldset.bbp-form p > br,
#bbpress-forums fieldset.bbp-form label + br,
#bbpress-forums .bbp-form label + br,
#bbpress-forums .bbp-the-content-wrapper > label + br,
.comment-form p > br,
.comment-form label + br {
  display: none !important;
}

#bbpress-forums fieldset.bbp-form p {
  margin-bottom: 1.25rem !important;
}

.comment-form input[type="submit"],
.search-form input[type="submit"],
.contact-submit-btn,
.button,
button[type="submit"] {
  display: inline-block;
  background-color: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.comment-form input[type="submit"]:hover,
.search-form input[type="submit"]:hover,
.contact-submit-btn:hover,
.button:hover,
button[type="submit"]:hover {
  background-color: var(--btn-hover-bg);
  border-color: var(--btn-hover-border);
  color: var(--btn-color);
  transform: translateY(-1px);
}

/* Contact & Linktree Hub Page */
.contact-hub-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.profile-hub-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.profile-avatar {
  margin-bottom: 1rem;
}

.profile-avatar img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: inline-block;
  object-fit: cover;
}

.profile-name {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.profile-bio {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.contact-page-content {
  margin-bottom: 2rem;
  text-align: center;
}

.hub-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.hub-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.hub-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Linktree Buttons */
.linktree-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.linktree-btn {
  display: flex;
  align-items: center;
  padding: 0.95rem 1.35rem;
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.linktree-btn:hover {
  background-color: var(--card-bg, #ffffff);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.linktree-btn .link-icon {
  font-size: 1.25rem;
  margin-right: 0.85rem;
}

.linktree-btn .link-text {
  flex: 1;
  color: inherit;
}

.linktree-btn .link-arrow {
  color: var(--text-muted);
  opacity: 0.75;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.linktree-btn:hover .link-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Contact Info Cards */
.contact-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.15rem;
  background: var(--card-bg, #ffffff);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-info-card:hover {
  border-color: var(--accent);
}

.contact-info-card .info-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.contact-info-card strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.contact-info-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  word-break: break-word;
  line-height: 1.45;
}

.contact-info-card a {
  color: var(--text-muted);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.contact-info-card a:hover {
  color: var(--accent);
}

/* Custom Contact Form */
.contact-custom-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-custom-form .form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-custom-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.contact-custom-form input[type="text"],
.contact-custom-form input[type="email"],
.contact-custom-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg, #ffffff);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-custom-form input:focus,
.contact-custom-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

html[data-theme="dark"] .contact-custom-form input:focus,
html[data-theme="dark"] .contact-custom-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2);
}

.contact-submit-btn {
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

/* Contact Alerts */
.contact-alert {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
}

.alert-error {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ffcdd2;
}

html[data-theme="dark"] .alert-success {
  background: #1b3820;
  color: #a5d6a7;
  border-color: #2e5936;
}

html[data-theme="dark"] .alert-error {
  background: #3b1e22;
  color: #ef9a9a;
  border-color: #5c2c31;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert-success {
    background: #1b3820;
    color: #a5d6a7;
    border-color: #2e5936;
  }
  :root:not([data-theme="light"]) .alert-error {
    background: #3b1e22;
    color: #ef9a9a;
    border-color: #5c2c31;
  }
}

@media (max-width: 600px) {
  .contact-custom-form .form-row-split {
    grid-template-columns: 1fr;
  }
}

/* 404 & Empty states */
.not-found-container {
  padding: 3rem 0;
  text-align: center;
}

.not-found-container h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.not-found-container p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 1120px) {
  .site-toc-sidebar,
  .site-sidebar-right {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-posts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 840px) {
  .site-body-layout {
    flex-direction: column;
    gap: 2.5rem;
  }

  .site-sidebar {
    width: 100%;
    position: static;
    border-right: none;
    padding-right: 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .sidebar-menu li {
    margin-bottom: 0;
  }

  .sidebar-widgets {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
}

@media (max-width: 640px) {
  .site-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .site-header-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .site-header-search {
    flex: 1;
    margin-left: 0;
  }

  .site-header-search .search-form,
  .site-header-search .search-form label {
    width: 100%;
  }

  .site-header-search .search-form input[type="search"] {
    width: 100%;
  }

  .site-header-search .search-form input[type="search"]:focus {
    width: 100%;
  }

  .home-posts-grid {
    grid-template-columns: 1fr;
  }

  .hero-side-card {
    gap: 0.85rem;
  }

  .hero-side-thumb {
    width: 115px;
  }
}

/* ==========================================================================
   bbPress Complete Modern Styling (Dark & Light Mode Integration)
   ========================================================================== */

.bbpress-container {
  width: 100%;
}

.bbpress-page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.bbpress-main-title {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

#bbpress-forums {
  font-family: var(--font-main);
  font-size: 0.95rem;
  line-height: var(--line-height);
  color: var(--text);
  background: transparent !important;
  margin-bottom: 2.5rem;
  overflow: visible;
}

#bbpress-forums hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

/* Top bar: Breadcrumb & Search */
#bbpress-forums div.bbp-breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  float: none;
}

#bbpress-forums div.bbp-breadcrumb p,
#bbpress-forums .bbp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

#bbpress-forums div.bbp-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

#bbpress-forums div.bbp-breadcrumb a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

#bbpress-forums div.bbp-breadcrumb .bbp-breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.6;
  margin: 0 0.15rem;
}

#bbpress-forums div.bbp-breadcrumb .bbp-breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* bbPress Forum Search Form (Eliminated in favor of top header search) */
#bbpress-forums #bbp-search-form,
.bbp-search-form,
#bbp-search-form {
  display: none !important;
}

/* Search Results Post Type Badges */
.search-type-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.search-type-badge.badge-topic {
  background-color: #9c27b0;
  color: #ffffff;
}

.search-type-badge.badge-reply {
  background-color: #0088cc;
  color: #ffffff;
}

.search-type-badge.badge-forum {
  background-color: #10b981;
  color: #ffffff;
}

.search-type-badge.badge-post {
  background-color: var(--code-bg);
  color: var(--accent);
  border: 1px solid var(--border);
}

.search-type-badge.badge-page {
  background-color: var(--code-bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}


/* Forum & Topic Lists Container (Discourse Style) */
#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results {
  font-size: 0.95rem;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  background-color: var(--bg) !important;
  margin-bottom: 2.25rem;
  overflow: hidden;
  list-style: none;
  padding: 0;
}

/* Header Row of Tables */
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
  background-color: var(--code-bg) !important;
  border-top: none !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0.8rem 1.25rem !important;
  font-weight: 600;
  color: var(--text) !important;
}

#bbpress-forums li.bbp-header ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

#bbpress-forums li.bbp-header .bbp-forum-info,
#bbpress-forums li.bbp-header .bbp-topic-title,
#bbpress-forums li.bbp-header .bbp-reply-author,
#bbpress-forums li.bbp-header .bbp-reply-content {
  flex: 1;
  min-width: 0;
  color: var(--accent) !important;
  font-weight: 700;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

#bbpress-forums li.bbp-header .bbp-topic-voice-count,
#bbpress-forums li.bbp-header .bbp-topic-posters {
  width: 100px;
  flex-shrink: 0;
  color: var(--text-muted) !important;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-align: center;
}

#bbpress-forums li.bbp-header .bbp-forum-topic-count,
#bbpress-forums li.bbp-header .bbp-forum-reply-count,
#bbpress-forums li.bbp-header .bbp-topic-reply-count {
  width: 80px;
  flex-shrink: 0;
  color: var(--text-muted) !important;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-align: center;
}

#bbpress-forums li.bbp-header .bbp-forum-freshness,
#bbpress-forums li.bbp-header .bbp-topic-freshness {
  width: 90px;
  flex-shrink: 0;
  color: var(--text-muted) !important;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-align: right;
}

/* Body Rows (Discourse Style) */
#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic,
#bbpress-forums .discourse-topic-row,
#bbpress-forums .discourse-forum-row {
  border-top: 1px solid var(--border) !important;
  padding: 0.95rem 1.25rem !important;
  background-color: transparent !important;
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  gap: 0.75rem;
}

#bbpress-forums li.bbp-body ul.forum:first-child,
#bbpress-forums li.bbp-body ul.topic:first-child {
  border-top: none !important;
}

#bbpress-forums li.bbp-body ul.forum:hover,
#bbpress-forums li.bbp-body ul.topic:hover,
#bbpress-forums .discourse-topic-row:hover,
#bbpress-forums .discourse-forum-row:hover {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

@media (prefers-color-scheme: light) {
  #bbpress-forums li.bbp-body ul.forum:hover,
  #bbpress-forums li.bbp-body ul.topic:hover,
  #bbpress-forums .discourse-topic-row:hover,
  #bbpress-forums .discourse-forum-row:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
  }
}

/* Main Column: Title, Badges & Tags */
#bbpress-forums li.bbp-topic-title,
#bbpress-forums li.bbp-forum-info {
  flex: 1;
  min-width: 0;
  padding: 0 !important;
}

.discourse-topic-main,
.discourse-forum-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.discourse-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.discourse-status-icon {
  font-size: 0.9rem;
  line-height: 1;
}

a.discourse-title-link,
#bbpress-forums .discourse-title-link,
#bbpress-forums li.bbp-topic-title a.bbp-topic-permalink {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: var(--text) !important;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  font-family: inherit !important;
  transition: color 0.15s ease !important;
}

a.discourse-title-link:hover,
#bbpress-forums .discourse-title-link:hover,
#bbpress-forums li.bbp-topic-title a.bbp-topic-permalink:hover {
  color: var(--accent) !important;
  background: transparent !important;
  border: none !important;
}

/* Category Badge & Meta Row */
.discourse-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.discourse-category-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--badge-color, #9c27b0);
  color: #ffffff !important;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  text-decoration: none;
  line-height: 1.3;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.discourse-category-badge:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Discourse Tags with ■ Bullet */
.discourse-topic-tags {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.discourse-tag-item {
  color: var(--text-muted) !important;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s ease;
}

.discourse-tag-item .tag-bullet {
  font-size: 0.62rem;
  color: var(--text-muted);
  opacity: 0.75;
}

.discourse-tag-item:hover {
  color: var(--text) !important;
}

.discourse-tag-item:hover .tag-bullet {
  color: var(--accent);
}

/* Discourse Forum Card Row */
.discourse-forum-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.discourse-category-bar {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

a.discourse-forum-title-link,
#bbpress-forums a.bbp-forum-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

a.discourse-forum-title-link:hover,
#bbpress-forums a.bbp-forum-title:hover {
  color: var(--accent) !important;
}

.discourse-forum-desc {
  font-size: 0.85rem;
  color: var(--text-muted) !important;
  line-height: 1.5;
  margin-top: 0.2rem;
}

/* Posters / Participants Column (Avatars Cluster) */
.discourse-col-posters,
#bbpress-forums li.bbp-topic-voice-count {
  width: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.discourse-posters-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.discourse-poster-link {
  display: inline-flex;
  position: relative;
  margin-left: -6px;
  transition: transform 0.15s ease, z-index 0.15s ease;
}

.discourse-poster-link:first-child {
  margin-left: 0;
}

.discourse-poster-link:hover {
  transform: scale(1.2);
  z-index: 10;
}

.discourse-poster-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background-color: var(--code-bg);
  object-fit: cover;
  display: block;
}

/* Replies / Stat Count Column */
.discourse-col-replies,
#bbpress-forums li.bbp-topic-reply-count,
#bbpress-forums li.bbp-forum-topic-count,
#bbpress-forums li.bbp-forum-reply-count {
  width: 80px;
  flex-shrink: 0;
  text-align: center;
  padding: 0 !important;
}

.discourse-stat-num {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-block;
}

.discourse-stat-num.is-high-activity {
  color: var(--accent) !important;
  font-weight: 700;
}

/* Freshness / Activity Column */
.discourse-col-freshness,
#bbpress-forums li.bbp-topic-freshness,
#bbpress-forums li.bbp-forum-freshness {
  width: 90px;
  flex-shrink: 0;
  text-align: right;
  padding: 0 !important;
  font-size: 0.85rem;
  color: var(--text-muted) !important;
}

.discourse-freshness-text a,
#bbpress-forums .bbp-topic-freshness a,
#bbpress-forums .bbp-forum-freshness a {
  color: var(--text-muted) !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.discourse-freshness-text a:hover,
#bbpress-forums .bbp-topic-freshness a:hover,
#bbpress-forums .bbp-forum-freshness a:hover {
  color: var(--accent) !important;
  text-decoration: underline;
}

.discourse-freshness-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.discourse-freshness-avatar img.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

.discourse-empty-freshness {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sub-forums list & Tags */
#bbpress-forums .bbp-forums-list {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.8rem;
}

#bbpress-forums .bbp-forums-list li {
  margin: 0;
}

#bbpress-forums .bbp-forums-list a {
  color: var(--accent) !important;
  text-decoration: none;
  background: var(--code-bg);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.2s ease;
}

#bbpress-forums .bbp-forums-list a:hover {
  border-color: var(--accent);
}

#bbpress-forums .bbp-topic-tags {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

#bbpress-forums .bbp-topic-tags a {
  color: var(--text-muted) !important;
  background: var(--code-bg);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  margin-left: 0.35rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

#bbpress-forums .bbp-topic-tags a:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
}

/* ==========================================================================
   bbPress Single Topic, Replies & Discussion Thread
   ========================================================================== */

/* Hide the redundant table header "AUTOR / POSTS" on discussion threads */
#bbpress-forums ul.bbp-replies li.bbp-header,
#bbpress-forums ul.bbp-lead-topic li.bbp-header {
  display: none !important;
}

#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-lead-topic {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
  margin-bottom: 2rem !important;
}

#bbpress-forums ul.bbp-replies li.bbp-body,
#bbpress-forums ul.bbp-lead-topic li.bbp-body {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bbp-lead-topic-wrapper,
.bbp-reply-post-wrapper {
  display: block;
  margin-bottom: 2rem;
  overflow: visible;
}

/* Post Header Bar (Glued to the content card below it) */
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header {
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 0.65rem 1.25rem !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  display: block !important;
  clear: both !important;
}

#bbpress-forums div.bbp-topic-header .bbp-meta,
#bbpress-forums div.bbp-reply-header .bbp-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 0.75rem !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
}

#bbpress-forums div.bbp-topic-header .bbp-meta::after,
#bbpress-forums div.bbp-reply-header .bbp-meta::after,
#bbpress-forums div.bbp-topic-header .bbp-meta::before,
#bbpress-forums div.bbp-reply-header .bbp-meta::before {
  display: none !important;
  content: none !important;
}

/* 1. Date (Left) */
#bbpress-forums .bbp-reply-post-date,
#bbpress-forums .bbp-topic-post-date {
  float: none !important;
  color: var(--text-muted) !important;
  font-size: 0.825rem !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Hide action buttons from top header bar completely */
#bbpress-forums div.bbp-topic-header .bbp-admin-links,
#bbpress-forums div.bbp-reply-header .bbp-admin-links,
#bbpress-forums .bbp-meta .bbp-admin-links {
  display: none !important;
}

/* 2. Post Permalink / Number (Right) inside post headers */
#bbpress-forums div.bbp-topic-header a.bbp-topic-permalink,
#bbpress-forums div.bbp-reply-header a.bbp-reply-permalink {
  float: none !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.825rem !important;
  font-family: var(--font-mono) !important;
  padding: 0.2rem 0.55rem !important;
  background-color: var(--card-bg, #ffffff) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  transition: all 0.15s ease !important;
  line-height: 1.3 !important;
}

html[data-theme="dark"] #bbpress-forums div.bbp-topic-header a.bbp-topic-permalink,
html[data-theme="dark"] #bbpress-forums div.bbp-reply-header a.bbp-reply-permalink {
  background-color: #181817 !important;
  border-color: #383632 !important;
}

#bbpress-forums div.bbp-topic-header a.bbp-topic-permalink:hover,
#bbpress-forums div.bbp-reply-header a.bbp-reply-permalink:hover {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
  transform: translateY(-1px);
}

/* Post Content Box & Layout (Glued directly to the header above) */
#bbpress-forums div.hentry {
  border: 1px solid var(--border) !important;
  border-top: none !important;
  border-radius: 0 0 8px 8px !important;
  background-color: var(--card-bg, #ffffff) !important;
  padding: 1.35rem 1.35rem 0.4rem 1.35rem !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] #bbpress-forums div.hentry {
  background-color: #181817 !important;
}

/* Author Profile Column */
#bbpress-forums .bbp-topic-author,
#bbpress-forums .bbp-reply-author {
  width: 140px;
  flex-shrink: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 1.5rem;
  border-right: 1px solid var(--border);
}

#bbpress-forums .bbp-topic-author a.bbp-author-link,
#bbpress-forums .bbp-reply-author a.bbp-author-link {
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#bbpress-forums .bbp-topic-author img.avatar,
#bbpress-forums .bbp-reply-author img.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin-bottom: 0.6rem;
  display: block;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

#bbpress-forums .bbp-author-name {
  font-weight: 700;
  color: var(--text) !important;
  transition: color 0.15s ease;
}

#bbpress-forums .bbp-topic-author .bbp-author-name,
#bbpress-forums .bbp-reply-author .bbp-author-name {
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.25rem;
  word-break: break-word;
  line-height: 1.3;
}

#bbpress-forums .bbp-author-name:hover {
  color: var(--accent) !important;
}

/* Hide Redundant Nickname and Raw IP Address */
#bbpress-forums .bbp-author-nickname,
#bbpress-forums .bbp-user-nicename,
#bbpress-forums .bbp-author-ip {
  display: none !important;
}

/* Author Role Badge */
#bbpress-forums .bbp-author-role {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--accent);
  display: inline-block;
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

#bbpress-forums .bbp-topic-content,
#bbpress-forums .bbp-reply-content {
  flex: 1;
  min-width: 0;
  padding-left: 0.5rem;
  font-size: 1.025rem;
  line-height: 1.75;
  color: var(--text) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 100%;
}

#bbpress-forums .bbp-topic-content p,
#bbpress-forums .bbp-reply-content p {
  margin-bottom: 1.15rem;
}

#bbpress-forums .bbp-topic-content p:last-of-type,
#bbpress-forums .bbp-reply-content p:last-of-type {
  margin-bottom: 0.5rem;
}

#bbpress-forums .bbp-topic-content a,
#bbpress-forums .bbp-reply-content a {
  color: var(--accent) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#bbpress-forums .bbp-topic-content a:hover,
#bbpress-forums .bbp-reply-content a:hover {
  color: var(--accent-hover) !important;
}

#bbpress-forums .bbp-topic-content pre,
#bbpress-forums .bbp-reply-content pre {
  background: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px;
  padding: 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  color: var(--text) !important;
}

#bbpress-forums .bbp-topic-content blockquote,
#bbpress-forums .bbp-reply-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.15rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Action Buttons at the Bottom of the Post Body (Above Delimiting Line) */
#bbpress-forums .bbp-topic-content .bbp-admin-links,
#bbpress-forums .bbp-reply-content .bbp-admin-links,
#bbpress-forums .bbp-topic-footer-actions,
#bbpress-forums .bbp-reply-footer-actions,
#bbpress-forums div.hentry .bbp-admin-links {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 0.3rem !important;
  margin-top: auto !important;
  padding-top: 0.35rem !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-top: none !important;
  font-size: 0.62rem !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: transparent !important; /* Hides raw "|" separator text nodes */
}

#bbpress-forums .bbp-topic-content .bbp-admin-links a,
#bbpress-forums .bbp-reply-content .bbp-admin-links a,
#bbpress-forums .bbp-topic-footer-actions a,
#bbpress-forums .bbp-reply-footer-actions a,
#bbpress-forums div.hentry .bbp-admin-links a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  padding: 0.15rem 0.45rem !important;
  border-radius: 3px !important;
  background-color: var(--card-bg, #ffffff) !important;
  border: 1px solid var(--border) !important;
  transition: all 0.15s ease !important;
  line-height: 1.25 !important;
  font-size: 0.62rem !important;
  display: inline-flex !important;
  align-items: center !important;
}

html[data-theme="dark"] #bbpress-forums .bbp-topic-content .bbp-admin-links a,
html[data-theme="dark"] #bbpress-forums .bbp-reply-content .bbp-admin-links a,
html[data-theme="dark"] #bbpress-forums .bbp-topic-footer-actions a,
html[data-theme="dark"] #bbpress-forums .bbp-reply-footer-actions a,
html[data-theme="dark"] #bbpress-forums div.hentry .bbp-admin-links a {
  background-color: #181817 !important;
  border-color: #383632 !important;
}

#bbpress-forums .bbp-topic-content .bbp-admin-links a:hover,
#bbpress-forums .bbp-reply-content .bbp-admin-links a:hover,
#bbpress-forums .bbp-topic-footer-actions a:hover,
#bbpress-forums .bbp-reply-footer-actions a:hover,
#bbpress-forums div.hentry .bbp-admin-links a:hover {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #181817 !important;
  transform: translateY(-1px);
}

/* Favorite & Subscription Toggle Buttons */
#bbpress-forums #favorite-toggle,
#bbpress-forums #subscription-toggle {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

#bbpress-forums #favorite-toggle a,
#bbpress-forums #subscription-toggle a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.95rem;
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px;
  color: var(--text-muted) !important;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

#bbpress-forums #favorite-toggle a:hover,
#bbpress-forums #subscription-toggle a:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* ==========================================================================
   bbPress Forms (Create Topic, Reply, Edit & Settings)
   ========================================================================== */

#bbpress-forums fieldset.bbp-form {
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 2rem !important;
  background-color: var(--card-bg, #ffffff) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  margin: 2.5rem 0 !important;
}

#bbpress-forums fieldset.bbp-form legend {
  display: block !important;
  float: left !important;
  width: 100% !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  padding: 0 0 0.85rem 0 !important;
  margin: 0 0 1.5rem 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  letter-spacing: -0.01em;
  box-sizing: border-box !important;
}

#bbpress-forums fieldset.bbp-form label {
  display: block !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.55rem !important;
  color: var(--text) !important;
}

#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form input[type="password"],
#bbpress-forums fieldset.bbp-form select {
  width: 100%;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0.75rem 1rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background-color: var(--card-bg, #ffffff) !important;
  color: var(--text) !important;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  margin-bottom: 1.25rem;
  box-sizing: border-box !important;
}

#bbpress-forums fieldset.bbp-form input[type="text"]:focus,
#bbpress-forums fieldset.bbp-form input[type="password"]:focus,
#bbpress-forums fieldset.bbp-form select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15) !important;
}

/* Dark Mode Form Inputs Contrast */
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form input[type="text"],
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form input[type="password"],
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form select {
  background-color: var(--code-bg) !important;
  border-color: #383632 !important;
}

html[data-theme="dark"] #bbpress-forums fieldset.bbp-form input[type="text"]:focus,
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form input[type="password"]:focus,
html[data-theme="dark"] #bbpress-forums fieldset.bbp-form select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form input[type="text"],
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form input[type="password"],
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form select {
    background-color: var(--code-bg) !important;
    border-color: #383632 !important;
  }
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form input[type="text"]:focus,
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form input[type="password"]:focus,
  :root:not([data-theme="light"]) #bbpress-forums fieldset.bbp-form select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
  }
}

/* WordPress Core Editor Overrides & Styling inside bbPress */
#bbpress-forums .wp-editor-wrap,
#bbpress-forums .bbp-the-content-wrapper,
#bbpress-forums div.wp-editor-wrap {
  margin-bottom: 1.5rem !important;
  border: none !important;
  background: transparent !important;
}

#bbpress-forums .wp-editor-container,
#bbpress-forums div.wp-editor-container,
#bbpress-forums [id$="-editor-container"] {
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background-color: var(--bg) !important;
  overflow: hidden !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#bbpress-forums .wp-editor-container:focus-within,
#bbpress-forums div.wp-editor-container:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15) !important;
}

html[data-theme="dark"] #bbpress-forums .wp-editor-container,
html[data-theme="dark"] #bbpress-forums div.wp-editor-container,
html[data-theme="dark"] #bbpress-forums [id$="-editor-container"] {
  background-color: #141413 !important;
  border-color: #383632 !important;
}

html[data-theme="dark"] #bbpress-forums .wp-editor-container:focus-within,
html[data-theme="dark"] #bbpress-forums div.wp-editor-container:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #bbpress-forums .wp-editor-container,
  :root:not([data-theme="light"]) #bbpress-forums div.wp-editor-container,
  :root:not([data-theme="light"]) #bbpress-forums [id$="-editor-container"] {
    background-color: #141413 !important;
    border-color: #383632 !important;
  }
  :root:not([data-theme="light"]) #bbpress-forums .wp-editor-container:focus-within,
  :root:not([data-theme="light"]) #bbpress-forums div.wp-editor-container:focus-within {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
  }
}

#bbpress-forums .quicktags-toolbar,
#bbpress-forums div.quicktags-toolbar,
#bbpress-forums .wp-editor-container .quicktags-toolbar {
  background-color: var(--code-bg) !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 6px 6px 0 0 !important;
  padding: 0.5rem 0.65rem !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

html[data-theme="dark"] #bbpress-forums .quicktags-toolbar,
html[data-theme="dark"] #bbpress-forums div.quicktags-toolbar,
html[data-theme="dark"] #bbpress-forums .wp-editor-container .quicktags-toolbar {
  border-bottom-color: #383632 !important;
}

/* WordPress Quicktags Toolbar Icon Buttons */
#bbpress-forums .quicktags-toolbar input.button,
#bbpress-forums .quicktags-toolbar input.ed_button,
#bbpress-forums .quicktags-toolbar button {
  background-color: var(--card-bg, #ffffff) !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  padding: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  margin: 0 !important;
  cursor: pointer !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 16px 16px !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input.button,
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input.ed_button,
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar button {
  background-color: #181817 !important;
  border-color: #383632 !important;
}

#bbpress-forums .quicktags-toolbar input.button:hover,
#bbpress-forums .quicktags-toolbar input.ed_button:hover,
#bbpress-forums .quicktags-toolbar button:hover {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  filter: brightness(0.2) invert(0);
  transform: translateY(-1px);
}

/* Specific Toolbar Icons */
#bbpress-forums .quicktags-toolbar input[id*="_strong"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_strong"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_em"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_em"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_link"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_link"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_block"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_block"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_del"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_del"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_img"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_img"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_ul"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_ul"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_ol"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_ol"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_li"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_li"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_code"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_code"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums .quicktags-toolbar input[id*="_close"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5850'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] #bbpress-forums .quicktags-toolbar input[id*="_close"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e0dbcd'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") !important;
}

#bbpress-forums textarea.bbp-the-content,
#bbpress-forums textarea.wp-editor-area,
#bbpress-forums .wp-editor-container textarea {
  width: 100% !important;
  padding: 1rem !important;
  border: none !important;
  border-radius: 0 0 6px 6px !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  min-height: 190px !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  display: block !important;
}

html[data-theme="dark"] #bbpress-forums textarea.bbp-the-content,
html[data-theme="dark"] #bbpress-forums textarea.wp-editor-area,
html[data-theme="dark"] #bbpress-forums .wp-editor-container textarea {
  background-color: #141413 !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #bbpress-forums textarea.bbp-the-content,
  :root:not([data-theme="light"]) #bbpress-forums textarea.wp-editor-area,
  :root:not([data-theme="light"]) #bbpress-forums .wp-editor-container textarea {
    background-color: #141413 !important;
  }
}

/* Checkbox (Notify & Subscription) */
#bbpress-forums fieldset.bbp-form input[type="checkbox"] {
  accent-color: var(--accent) !important;
  margin-right: 0.5rem;
}

/* Form Submit Wrapper */
#bbpress-forums .bbp-submit-wrapper {
  margin-top: 1.75rem;
  text-align: right;
}

#bbpress-forums button.button.submit,
#bbpress-forums .bbp-submit-wrapper button,
#bbpress-forums input[type="submit"]#bbp_topic_submit,
#bbpress-forums input[type="submit"]#bbp_reply_submit {
  background-color: var(--btn-bg) !important;
  color: var(--btn-color) !important;
  border: 1px solid var(--btn-border) !important;
  padding: 0.85rem 2rem !important;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#bbpress-forums button.button.submit:hover,
#bbpress-forums .bbp-submit-wrapper button:hover,
#bbpress-forums input[type="submit"]#bbp_topic_submit:hover,
#bbpress-forums input[type="submit"]#bbp_reply_submit:hover {
  background-color: var(--btn-hover-bg) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: translateY(-1px);
}

/* Alerts & Notices (Compact Single-Line Architecture) */
#bbpress-forums div.bbp-template-notice,
#bbpress-forums div.indicator-hint {
  padding: 0.55rem 1rem !important;
  border-radius: 6px !important;
  margin: 1rem 0 1.25rem !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--accent) !important;
  color: var(--text-muted) !important;
  display: block !important;
  min-height: auto !important;
}

#bbpress-forums div.bbp-template-notice ul,
#bbpress-forums div.bbp-template-notice li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline !important;
  width: 100% !important;
}

#bbpress-forums div.bbp-template-notice p,
#bbpress-forums div.indicator-hint p {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  display: inline !important;
  line-height: 1.5 !important;
}

#bbpress-forums div.bbp-template-notice .bbp-author-name {
  display: inline !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
}

#bbpress-forums div.bbp-template-notice .bbp-author-link,
#bbpress-forums div.bbp-template-notice .bbp-topic-freshness-author {
  display: inline !important;
  text-decoration: none !important;
  color: inherit !important;
}

#bbpress-forums div.bbp-template-notice img.avatar {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 1px solid var(--border) !important;
  vertical-align: -3px !important;
  margin: 0 0.25rem !important;
  display: inline-block !important;
  object-fit: cover !important;
}

#bbpress-forums div.bbp-template-notice a {
  color: var(--accent) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

#bbpress-forums div.bbp-template-notice a:hover {
  text-decoration: underline !important;
}

#bbpress-forums div.bbp-template-notice.info {
  border-left: 4px solid var(--accent) !important;
}

#bbpress-forums div.bbp-template-notice.warning,
#bbpress-forums div.bbp-template-notice.error {
  border-left: 4px solid #ef5350 !important;
  background-color: rgba(239, 83, 80, 0.08) !important;
  color: var(--text) !important;
}

/* ==========================================================================
   bbPress User Profile Page
   ========================================================================== */

#bbpress-forums #bbp-user-wrapper {
  display: flex;
  gap: 2.25rem;
  margin-top: 2rem;
}

#bbpress-forums #bbp-single-user-details {
  width: 220px;
  flex-shrink: 0;
  text-align: center;
  padding: 1.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--code-bg);
}

#bbpress-forums #bbp-single-user-details #bbp-user-avatar img.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin-bottom: 0.85rem;
  object-fit: cover;
}

#bbpress-forums #bbp-single-user-details .bbp-user-nicename {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

#bbpress-forums #bbp-user-navigation ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  border-top: 1px solid var(--border);
  padding-top: 1.15rem;
  text-align: left;
}

#bbpress-forums #bbp-user-navigation li {
  margin-bottom: 0.5rem;
}

#bbpress-forums #bbp-user-navigation a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

#bbpress-forums #bbp-user-navigation a:hover,
#bbpress-forums #bbp-user-navigation li.current a {
  color: var(--accent);
  background: rgba(229, 183, 88, 0.08);
  font-weight: 600;
}

#bbpress-forums #bbp-user-body {
  flex: 1;
  min-width: 0;
}

/* ==========================================================================
   bbPress Top Bar (Pagination Count + Action Buttons in a Single Line)
   ========================================================================== */

.bbp-topic-pagination-bar-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  margin: 1.25rem 0 0.85rem !important;
  padding: 0 !important;
  width: 100% !important;
}

.bbp-topic-pagination-bar-top .bbp-pagination-count {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

.bbp-forum-actions-top {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  margin-left: auto !important;
}

.bbp-forum-actions-top #subscription-toggle,
.bbp-forum-actions-top #favorite-toggle {
  margin: 0 !important;
  display: inline-flex !important;
}

.bbp-topic-pagination-bar-bottom {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin: 1rem 0 !important;
}

/* Hide standalone redundant subscription toggles and bottom pagination counts */
#bbpress-forums > #subscription-toggle,
#bbpress-forums > #favorite-toggle,
.bbp-topic-pagination-bar-bottom .bbp-pagination-count,
#bbpress-forums .bbp-pagination:last-of-type .bbp-pagination-count {
  display: none !important;
}

/* ==========================================================================
   bbPress Pagination Links
   ========================================================================== */

#bbpress-forums .bbp-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.75rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  float: none;
  clear: both;
}

#bbpress-forums .bbp-pagination-links {
  float: none;
}

#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span.current {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  margin: 0 0.2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

#bbpress-forums .bbp-pagination-links a {
  background-color: var(--code-bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

#bbpress-forums .bbp-pagination-links a:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

#bbpress-forums .bbp-pagination-links span.current {
  background-color: var(--btn-bg) !important;
  color: var(--accent) !important;
  border: 1px solid var(--accent) !important;
}

/* ==========================================================================
   bbPress Responsive Breakpoints
   ========================================================================== */

@media (max-width: 768px) {
  #bbpress-forums #bbp-user-wrapper {
    flex-direction: column;
  }

  #bbpress-forums #bbp-single-user-details {
    width: 100%;
  }

  #bbpress-forums li.bbp-header .bbp-forum-topic-count,
  #bbpress-forums li.bbp-header .bbp-forum-reply-count,
  #bbpress-forums li.bbp-header .bbp-topic-voice-count,
  #bbpress-forums li.bbp-header .bbp-topic-posters,
  #bbpress-forums li.bbp-header .bbp-topic-freshness,
  #bbpress-forums .bbp-forum-topic-count,
  #bbpress-forums .bbp-forum-reply-count,
  #bbpress-forums .bbp-topic-voice-count,
  #bbpress-forums .discourse-col-posters,
  #bbpress-forums .discourse-col-freshness {
    display: none !important;
  }

  #bbpress-forums div.hentry {
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem !important;
  }

  #bbpress-forums .bbp-topic-author,
  #bbpress-forums .bbp-reply-author {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
    padding-right: 0;
    padding-bottom: 0.85rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  #bbpress-forums .bbp-topic-author img.avatar,
  #bbpress-forums .bbp-reply-author img.avatar {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
  }

  #bbpress-forums .bbp-topic-content,
  #bbpress-forums .bbp-reply-content {
    padding-left: 0;
  }

  #bbpress-forums #bbp-search-form > div {
    max-width: 100%;
  }
}

/* ==========================================================================
   WooCommerce Complete Modern Styling (Dark & Light Mode Integration)
   ========================================================================== */

.woocommerce-page-container {
  width: 100%;
}

.search-type-badge.badge-product {
  background-color: #f59e0b;
  color: #181817;
  font-weight: 700;
}

/* Catalog Top Controls (Result Count & Ordering Dropdown) */
.woocommerce .woocommerce-result-count,
.woocommerce-page .woocommerce-result-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  float: left;
}

.woocommerce .woocommerce-ordering,
.woocommerce-page .woocommerce-ordering {
  margin-bottom: 1.75rem;
  float: right;
}

.woocommerce .woocommerce-ordering select,
.woocommerce-page .woocommerce-ordering select {
  background-color: var(--code-bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce .woocommerce-ordering select:focus,
.woocommerce-page .woocommerce-ordering select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2);
}

/* Products Grid (Catalog & Archives) */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 1.75rem !important;
  list-style: none !important;
  margin: 2rem 0 !important;
  padding: 0 !important;
  clear: both;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
  display: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background-color: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 1.25rem !important;
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
  border-color: var(--accent) !important;
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25) !important;
}

/* Product Thumbnail */
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  margin: 0 0 1rem 0 !important;
  display: block !important;
  transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover a img,
.woocommerce-page ul.products li.product:hover a img {
  transform: scale(1.03);
}

/* Sale Badge (Oferta!) */
.woocommerce span.onsale,
.woocommerce-page span.onsale,
.woocommerce ul.products li.product .onsale {
  position: absolute !important;
  top: 1rem !important;
  left: 1rem !important;
  right: auto !important;
  z-index: 5 !important;
  background-color: var(--accent) !important;
  color: #181817 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 4px !important;
  line-height: 1.2 !important;
  min-height: auto !important;
  min-width: auto !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Product Loop Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: var(--text) !important;
  padding: 0 !important;
  margin: 0 0 0.5rem 0 !important;
  transition: color 0.2s ease;
}

.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title {
  color: var(--accent) !important;
}

/* Star Rating */
.woocommerce .star-rating,
.woocommerce-page .star-rating {
  color: var(--accent) !important;
  font-size: 0.85rem !important;
  margin-bottom: 0.5rem !important;
}

/* Price */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
.woocommerce div.product p.price {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin: 0 0 1rem 0 !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 0.45rem !important;
  flex-wrap: wrap !important;
}

.woocommerce ul.products li.product .price del,
.woocommerce-page ul.products li.product .price del,
.woocommerce div.product p.price del {
  color: var(--text-muted) !important;
  font-size: 0.88rem !important;
  font-weight: 400 !important;
  text-decoration: line-through !important;
  opacity: 0.85 !important;
}

.woocommerce ul.products li.product .price ins,
.woocommerce-page ul.products li.product .price ins,
.woocommerce div.product p.price ins {
  text-decoration: none !important;
  color: var(--accent) !important;
  font-weight: 700 !important;
}

/* Add to Cart Buttons */
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background-color: var(--btn-bg) !important;
  color: var(--btn-color) !important;
  border: 1px solid var(--btn-border) !important;
  padding: 0.65rem 1.25rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  text-align: center !important;
  margin-top: auto !important;
  display: block !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background-color: var(--btn-hover-bg) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: translateY(-1px) !important;
}

.woocommerce ul.products li.product .added_to_cart {
  display: block !important;
  text-align: center !important;
  font-size: 0.825rem !important;
  color: var(--accent) !important;
  font-weight: 600 !important;
  margin-top: 0.5rem !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   Single Product Page
   ========================================================================== */

.woocommerce div.product,
.woocommerce-page div.product {
  margin-bottom: 3rem !important;
}

.woocommerce div.product .product_title {
  font-size: 2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--text) !important;
  margin-bottom: 0.75rem !important;
}

.woocommerce div.product div.summary {
  margin-bottom: 2.5rem !important;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 1rem !important;
  line-height: 1.7 !important;
  color: var(--text-muted) !important;
  margin: 1.25rem 0 1.5rem !important;
}

.woocommerce div.product .stock.in-stock {
  color: #10b981 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  margin-bottom: 1rem !important;
}

.woocommerce div.product .stock.out-of-stock {
  color: #ef5350 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  margin-bottom: 1rem !important;
}

/* Quantity Input */
.woocommerce .quantity,
.woocommerce-page .quantity {
  display: inline-flex !important;
  align-items: center !important;
  margin-right: 0.75rem !important;
}

.woocommerce .quantity .qty,
.woocommerce-page .quantity .qty {
  width: 70px !important;
  height: 44px !important;
  padding: 0.5rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  outline: none !important;
  transition: border-color 0.2s !important;
}

.woocommerce .quantity .qty:focus,
.woocommerce-page .quantity .qty:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(229, 183, 88, 0.2) !important;
}

.woocommerce div.product form.cart {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin: 1.5rem 0 2rem !important;
}

.woocommerce div.product form.cart .button {
  width: auto !important;
  padding: 0.75rem 2rem !important;
  font-size: 1rem !important;
}

/* Product Meta (SKU, Categories, Tags) */
.woocommerce div.product .product_meta {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  border-top: 1px solid var(--border) !important;
  padding-top: 1.25rem !important;
  margin-top: 1.5rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
}

.woocommerce div.product .product_meta a {
  color: var(--accent) !important;
  text-decoration: none !important;
}

.woocommerce div.product .product_meta a:hover {
  text-decoration: underline !important;
}

/* Product Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
  list-style: none !important;
  display: flex !important;
  gap: 0.5rem !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0 !important;
  margin: 3rem 0 0 0 !important;
  background: transparent !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs::after {
  display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.75rem 1.25rem !important;
  margin: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  text-decoration: none !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 2px solid transparent !important;
  display: block !important;
  transition: all 0.2s ease !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
  font-weight: 600 !important;
}

.woocommerce div.product .woocommerce-tabs .panel {
  border: 1px solid var(--border) !important;
  border-top: none !important;
  border-radius: 0 0 8px 8px !important;
  padding: 2rem !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  line-height: 1.7 !important;
}

/* ==========================================================================
   Cart, Checkout & Shop Tables
   ========================================================================== */

.woocommerce table.shop_table,
.woocommerce-page table.shop_table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background-color: var(--bg) !important;
  margin-bottom: 2rem !important;
}

.woocommerce table.shop_table th,
.woocommerce-page table.shop_table th {
  background-color: var(--code-bg) !important;
  color: var(--accent) !important;
  font-weight: 700 !important;
  padding: 0.9rem 1.15rem !important;
  border: 1px solid var(--border) !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.woocommerce table.shop_table td,
.woocommerce-page table.shop_table td {
  padding: 1rem 1.15rem !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  vertical-align: middle !important;
}

.woocommerce a.remove,
.woocommerce-page a.remove {
  color: #ef5350 !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  width: 26px !important;
  height: 26px !important;
  line-height: 24px !important;
  text-align: center !important;
  border-radius: 50% !important;
  border: 1px solid var(--border) !important;
  display: inline-block !important;
  transition: all 0.2s ease !important;
}

.woocommerce a.remove:hover,
.woocommerce-page a.remove:hover {
  background-color: #ef5350 !important;
  color: #ffffff !important;
  border-color: #ef5350 !important;
}

/* Cart Coupon & Actions */
.woocommerce table.shop_table td.actions .coupon,
.woocommerce-page table.shop_table td.actions .coupon {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
}

.woocommerce table.shop_table td.actions .coupon input.input-text,
.woocommerce-page table.shop_table td.actions .coupon input.input-text {
  padding: 0.6rem 0.9rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
  width: 160px !important;
}

.woocommerce table.shop_table td.actions .button,
.woocommerce-page table.shop_table td.actions .button {
  width: auto !important;
  display: inline-block !important;
}

/* Cart Totals Box */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  background-color: var(--code-bg) !important;
  padding: 1.75rem !important;
  max-width: 480px !important;
  margin-left: auto !important;
}

.woocommerce .cart-collaterals .cart_totals h2,
.woocommerce-page .cart-collaterals .cart_totals h2 {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 1.25rem !important;
}

.woocommerce .cart-collaterals .cart_totals table.shop_table,
.woocommerce-page .cart-collaterals .cart_totals table.shop_table {
  background: transparent !important;
  border: none !important;
}

.woocommerce .cart-collaterals .cart_totals .checkout-button,
.woocommerce-page .cart-collaterals .cart_totals .checkout-button {
  display: block !important;
  width: 100% !important;
  padding: 0.85rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
}

/* Checkout Form & Inputs */
.woocommerce form.checkout,
.woocommerce-page form.checkout {
  margin-top: 2rem !important;
}

.woocommerce form.checkout label,
.woocommerce-page form.checkout label {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.35rem !important;
  color: var(--text) !important;
}

.woocommerce form.checkout input[type="text"],
.woocommerce form.checkout input[type="email"],
.woocommerce form.checkout input[type="tel"],
.woocommerce form.checkout input[type="password"],
.woocommerce form.checkout select,
.woocommerce form.checkout textarea,
.woocommerce-page form.checkout input[type="text"],
.woocommerce-page form.checkout input[type="email"],
.woocommerce-page form.checkout input[type="tel"],
.woocommerce-page form.checkout input[type="password"],
.woocommerce-page form.checkout select,
.woocommerce-page form.checkout textarea {
  width: 100% !important;
  padding: 0.7rem 0.9rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-size: 0.95rem !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.woocommerce form.checkout input:focus,
.woocommerce form.checkout select:focus,
.woocommerce form.checkout textarea:focus,
.woocommerce-page form.checkout input:focus,
.woocommerce-page form.checkout select:focus,
.woocommerce-page form.checkout textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
}

/* Payment Methods Box in Checkout */
.woocommerce #payment,
.woocommerce-page #payment {
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 1.75rem !important;
  margin-top: 2rem !important;
}

.woocommerce #payment ul.payment_methods,
.woocommerce-page #payment ul.payment_methods {
  list-style: none !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  margin-bottom: 1.5rem !important;
}

.woocommerce #payment ul.payment_methods li,
.woocommerce-page #payment ul.payment_methods li {
  margin-bottom: 1rem !important;
  color: var(--text) !important;
}

.woocommerce #payment div.payment_box,
.woocommerce-page #payment div.payment_box {
  background-color: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 1rem !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  margin-top: 0.5rem !important;
}

.woocommerce #payment div.payment_box::before {
  display: none !important;
}

.woocommerce #payment #place_order,
.woocommerce-page #payment #place_order {
  width: 100% !important;
  padding: 0.9rem 1.5rem !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   My Account Page
   ========================================================================== */

.woocommerce-account .woocommerce-MyAccount-navigation {
  width: 220px !important;
  float: left !important;
  margin-right: 2.5rem !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  background-color: var(--code-bg) !important;
  overflow: hidden !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
  border-bottom: 1px solid var(--border) !important;
  margin: 0 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li:last-child {
  border-bottom: none !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block !important;
  padding: 0.75rem 1.25rem !important;
  color: var(--text) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.92rem !important;
  transition: all 0.2s ease !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
  color: var(--accent) !important;
  background-color: rgba(229, 183, 88, 0.08) !important;
  font-weight: 600 !important;
}

.woocommerce-account .woocommerce-MyAccount-content {
  float: right !important;
  width: calc(100% - 220px - 2.5rem) !important;
  color: var(--text) !important;
  line-height: 1.7 !important;
}

/* ==========================================================================
   WooCommerce Notices & Alerts
   ========================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 1rem 1.35rem !important;
  border-radius: 6px !important;
  margin-bottom: 2rem !important;
  font-size: 0.92rem !important;
  border: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}

.woocommerce-message {
  background-color: var(--code-bg) !important;
  border-left: 4px solid var(--accent) !important;
  color: var(--text) !important;
}

.woocommerce-message .button {
  width: auto !important;
  margin: 0 !important;
  padding: 0.4rem 0.95rem !important;
  font-size: 0.85rem !important;
}

.woocommerce-info {
  background-color: var(--code-bg) !important;
  border-left: 4px solid #0088cc !important;
  color: var(--text) !important;
}

.woocommerce-error {
  background-color: rgba(239, 83, 80, 0.08) !important;
  border-left: 4px solid #ef5350 !important;
  color: var(--text) !important;
  list-style: none !important;
}

/* ==========================================================================
   WooCommerce Responsive Breakpoints
   ========================================================================== */

@media (max-width: 840px) {
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 2rem !important;
  }
}

@media (max-width: 600px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: 1fr !important;
  }

  .woocommerce .woocommerce-ordering,
  .woocommerce-page .woocommerce-ordering,
  .woocommerce .woocommerce-result-count,
  .woocommerce-page .woocommerce-result-count {
    float: none !important;
    width: 100% !important;
  }

  .woocommerce .woocommerce-ordering select,
  .woocommerce-page .woocommerce-ordering select {
    width: 100% !important;
  }
}

/* ==========================================================================
   WooCommerce Blocks Checkout & Cart (Gutenberg Blocks Integration)
   ========================================================================== */

/* Root Block Wrapper */
.wp-block-woocommerce-checkout,
.wc-block-checkout,
.wp-block-woocommerce-cart,
.wc-block-cart {
  color: var(--text) !important;
}

/* Step Headings */
.wc-block-components-checkout-step__heading,
.wc-block-components-checkout-step__title,
.wc-block-components-title {
  color: var(--text) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

.wc-block-components-checkout-step__description {
  color: var(--text-muted) !important;
  font-size: 0.9rem !important;
}

/* Form Fields (Text inputs, Emails, Tel, Comboboxes, Selects) */
.wc-block-components-text-input,
.wc-block-components-combobox,
.wc-block-components-select,
.wc-block-components-country-input,
.wc-block-components-state-input {
  background-color: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  position: relative !important;
}

.wc-block-components-text-input input,
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="password"],
.wc-block-components-combobox input,
.wc-block-components-combobox .wc-block-components-combobox__input,
.wc-block-components-select select,
.wc-block-components-select .wc-block-components-select__select,
.wc-block-components-textarea textarea,
.wc-block-components-country-input input,
.wc-block-components-state-input input {
  background-color: transparent !important;
  background: transparent !important;
  color: var(--text) !important;
  border: none !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  padding: 0.75rem 0.9rem !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100% !important;
}

.wc-block-components-text-input input::placeholder,
.wc-block-components-combobox input::placeholder,
.wc-block-components-textarea textarea::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.65;
}

/* Floating Labels */
.wc-block-components-text-input label,
.wc-block-components-combobox label,
.wc-block-components-select label {
  color: var(--text-muted) !important;
  font-size: 0.9rem !important;
  background-color: transparent !important;
}

.wc-block-components-text-input.is-active,
.wc-block-components-combobox.is-active,
.wc-block-components-select.is-active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(229, 183, 88, 0.2) !important;
}

.wc-block-components-text-input.is-active label,
.wc-block-components-combobox.is-active label,
.wc-block-components-select.is-active label {
  color: var(--accent) !important;
  background-color: var(--bg) !important;
  padding: 0 0.35rem !important;
}

/* Combobox Options Dropdown (Country / State list) */
.wc-block-components-combobox__listbox,
.wc-block-components-combobox-list {
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  z-index: 1000 !important;
}

.wc-block-components-combobox__option {
  color: var(--text) !important;
  background-color: transparent !important;
  padding: 0.6rem 1rem !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease !important;
}

.wc-block-components-combobox__option:hover,
.wc-block-components-combobox__option[aria-selected="true"],
.wc-block-components-combobox__option.is-focused {
  background-color: rgba(229, 183, 88, 0.15) !important;
  color: var(--accent) !important;
}

/* Right Sidebar: Order Summary Card */
.wc-block-components-sidebar,
.wc-block-checkout__sidebar,
.wc-block-components-panel {
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  color: var(--text) !important;
}

.wc-block-components-order-summary__title,
.wc-block-components-panel__button {
  color: var(--text) !important;
  font-weight: 700 !important;
}

.wc-block-components-order-summary-item {
  border-bottom: 1px solid var(--border) !important;
  padding: 1rem 0 !important;
}

.wc-block-components-order-summary-item__image img {
  border-radius: 6px !important;
}

.wc-block-components-order-summary-item__title {
  color: var(--text) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

.wc-block-components-order-summary-item__quantity {
  background-color: var(--accent) !important;
  color: #181817 !important;
  font-weight: 700 !important;
  border: none !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__description {
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
}

.wc-block-components-order-summary-item__price {
  color: var(--accent) !important;
  font-weight: 700 !important;
}

/* Order Totals rows */
.wc-block-components-totals-item {
  color: var(--text-muted) !important;
  font-size: 0.9rem !important;
  padding: 0.5rem 0 !important;
}

.wc-block-components-totals-item__value {
  color: var(--text) !important;
  font-weight: 600 !important;
}

.wc-block-components-totals-footer-item {
  border-top: 1px solid var(--border) !important;
  margin-top: 0.75rem !important;
  padding-top: 1rem !important;
  font-size: 1.2rem !important;
  color: var(--text) !important;
  font-weight: 700 !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--accent) !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
}

/* Coupon section */
.wc-block-components-totals-coupon {
  margin: 1rem 0 !important;
  border-top: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0.75rem 0 !important;
}

.wc-block-components-totals-coupon__button {
  color: var(--accent) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  background: transparent !important;
}

.wc-block-components-totals-coupon__form .wc-block-components-text-input {
  background-color: var(--bg) !important;
}

.wc-block-components-totals-coupon__form button {
  background-color: var(--btn-bg) !important;
  color: var(--btn-color) !important;
  border: 1px solid var(--btn-border) !important;
  border-radius: 6px !important;
  padding: 0.6rem 1rem !important;
  font-weight: 600 !important;
}

/* Notice Banners (e.g. Payment method unavailable alert) */
.wc-block-components-notice-banner {
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 1rem 1.25rem !important;
  margin: 1.5rem 0 !important;
  color: var(--text) !important;
}

.wc-block-components-notice-banner.is-error {
  border-left: 4px solid #ef5350 !important;
  background-color: rgba(239, 83, 80, 0.08) !important;
}

.wc-block-components-notice-banner.is-info {
  border-left: 4px solid #0088cc !important;
  background-color: var(--code-bg) !important;
}

.wc-block-components-notice-banner.is-success {
  border-left: 4px solid #10b981 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
}

.wc-block-components-notice-banner__content {
  color: var(--text) !important;
  font-size: 0.92rem !important;
  line-height: 1.5 !important;
}

/* Place Order Button */
.wc-block-components-checkout-place-order-button,
button.wc-block-components-button.wp-element-button {
  background-color: var(--btn-bg) !important;
  color: var(--btn-color) !important;
  border: 1px solid var(--btn-border) !important;
  border-radius: 6px !important;
  padding: 0.9rem 1.5rem !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-top: 1.5rem !important;
}

.wc-block-components-checkout-place-order-button:hover,
button.wc-block-components-button.wp-element-button:hover {
  background-color: var(--btn-hover-bg) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: translateY(-1px) !important;
}

/* Checkbox & Terms */
.wc-block-components-checkbox label {
  color: var(--text) !important;
  font-size: 0.9rem !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input {
  accent-color: var(--accent) !important;
}

.wc-block-checkout__terms,
.wc-block-components-checkout-step .wc-block-components-text-input__help-text {
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
}

.wc-block-checkout__terms a {
  color: var(--accent) !important;
  text-decoration: underline !important;
}

/* Sidebar Search Widget Inputs in dark mode */
.site-sidebar .widget input[type="search"],
.site-sidebar .widget input[type="text"],
.sidebar-widgets input[type="search"],
.sidebar-widgets input[type="text"],
.widget_search input[type="search"] {
  width: 100% !important;
  padding: 0.5rem 0.8rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-size: 0.875rem !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
}

.site-sidebar .widget input[type="search"]:focus,
.site-sidebar .widget input[type="text"]:focus,
.sidebar-widgets input[type="search"]:focus,
.sidebar-widgets input[type="text"]:focus,
.widget_search input[type="search"]:focus {
  border-color: var(--accent) !important;
}

.site-sidebar .widget input[type="submit"],
.sidebar-widgets input[type="submit"],
.widget_search input[type="submit"] {
  background-color: var(--btn-bg) !important;
  color: var(--btn-color) !important;
  border: 1px solid var(--btn-border) !important;
  border-radius: 6px !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin-top: 0.5rem !important;
  transition: all 0.2s ease !important;
}

.site-sidebar .widget input[type="submit"]:hover,
.sidebar-widgets input[type="submit"]:hover,
.widget_search input[type="submit"]:hover {
  background-color: var(--btn-hover-bg) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

@media (max-width: 600px) {
  .header-nav-wrapper {
    flex-direction: column;
    gap: 0.75rem;
  }

  .header-cart-wrapper {
    position: static;
    transform: none;
    margin-top: 0.25rem;
  }
}


