/* ============================================================
   R1 Industrial FSE Theme - Global Stylesheet
   Version 3.0 — Minimal Dark Theme
   ============================================================ */

/* ============================================================
   0. Base Reset & Variables
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; overflow-x: hidden; background-color: #0a0a0a; color: #a0a0a0; }

:root {
    --r1-bg: #0a0a0a;
    --r1-surface: #141414;
    --r1-surface-hover: #1a1a1a;
    --r1-border: rgba(255, 255, 255, 0.06);
    --r1-border-hover: rgba(255, 255, 255, 0.12);
    --r1-text: #e5e5e5;
    --r1-muted: #888888;
    --r1-accent: #3b82f6;
    --r1-accent-hover: #60a5fa;
    --r1-radius: 12px;
    --r1-radius-lg: 16px;
    --r1-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --r1-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --r1-glow: 0 0 20px rgba(59, 130, 246, 0.08);
    --r1-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

::selection { background: rgba(59, 130, 246, 0.3); color: #ffffff; }

img { max-width: 100%; height: auto; }

.r1-modal-overlay { display: none; }

/* ============================================================
   1. Header
   ============================================================ */
.r1-header {
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--r1-border);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.r1-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
}

.r1-header-brand {
    flex-shrink: 0;
}

.r1-header .wp-block-site-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

.r1-header .wp-block-site-logo a {
    display: flex;
    align-items: center;
}

/* Navigation */
.r1-header .wp-block-navigation {
    flex-grow: 1;
    justify-content: center;
}

.r1-header .wp-block-navigation__container {
    gap: 4px;
}

.r1-header .wp-block-navigation-item a {
    text-decoration: none;
    color: #a0a0a0;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 99px;
    transition: var(--r1-transition);
}

.r1-header .wp-block-navigation-item:hover a,
.r1-header .wp-block-navigation-item.current-menu-item a {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Navigation submenu */
.r1-header .wp-block-navigation__submenu-container {
    background-color: #1a1a1a;
    min-width: 220px;
    border-radius: var(--r1-radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--r1-border);
    padding: 8px 0;
    margin-top: 4px;
}

.r1-header .wp-block-navigation__submenu-container a {
    display: block;
    padding: 10px 24px;
    color: #a0a0a0;
    font-size: 14px;
    transition: var(--r1-transition);
}

.r1-header .wp-block-navigation__submenu-container a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

/* Header actions */
.r1-header-actions {
    flex-shrink: 0;
    gap: 12px;
}

@media (max-width: 768px) {
    .r1-header-inner { height: 64px; padding: 0 16px; }
    .r1-header .wp-block-site-logo img { max-height: 40px; }
    .r1-header-actions { gap: 8px; }
}

/* Mobile overlay menu dark styling */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: #111111 !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
    color: #e5e5e5;
}

/* ============================================================
   2. Single Post
   ============================================================ */
.r1-single-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin: 0 0 20px;
}

.r1-single-meta {
    font-size: 14px;
    color: #888888;
}

.r1-single-content .wp-block-post-content {
    font-size: 17px;
    line-height: 1.8;
    color: #d4d4d4;
}

.r1-single-content .wp-block-post-content h2 {
    font-size: 26px;
    margin-top: 48px;
    margin-bottom: 16px;
    color: #ffffff;
}

.r1-single-content .wp-block-post-content h3 {
    font-size: 20px;
    margin-top: 36px;
    margin-bottom: 12px;
    color: #ffffff;
}

.r1-single-content .wp-block-post-content p {
    color: #d4d4d4;
}

.r1-single-content .wp-block-post-content blockquote {
    background: var(--r1-surface);
    border-left: 4px solid var(--r1-accent);
    padding: 16px 24px;
    margin: 32px 0;
    border-radius: 0 var(--r1-radius) var(--r1-radius) 0;
    font-style: normal;
    color: #d4d4d4;
}

.r1-single-content .wp-block-post-content img {
    border-radius: var(--r1-radius);
}

.r1-single-content .wp-block-post-content a {
    color: var(--r1-accent);
    transition: color 0.2s;
}

.r1-single-content .wp-block-post-content a:hover {
    color: var(--r1-accent-hover);
}

.r1-single-content .wp-block-post-content ul,
.r1-single-content .wp-block-post-content ol {
    color: #d4d4d4;
}

.r1-single-content .wp-block-post-content code {
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e5c07b;
}

.r1-single-content .wp-block-post-content pre {
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius);
    padding: 20px 24px;
    overflow-x: auto;
}

.r1-single-content .wp-block-post-content pre code {
    background: none;
    border: none;
    padding: 0;
}

.r1-single-thumb img {
    border-radius: var(--r1-radius-lg);
}

.r1-single-sidebar-wrap {
    width: 340px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .r1-single-sidebar-wrap { width: 300px; }
}
@media (max-width: 768px) {
    .r1-single-layout { flex-direction: column; }
    .r1-single-sidebar-wrap { width: 100%; padding-left: 0 !important; }
    .r1-single-title { font-size: 26px; }
}

/* Comments area */
.r1-comments-area {
    max-width: 800px;
    color: #a0a0a0;
}

.r1-comments-area h2 {
    color: #ffffff;
}

.r1-comments-area .wp-block-comment-author-name {
    color: #e5e5e5;
}

.r1-comments-area .wp-block-comment-content {
    color: #d4d4d4;
}

.r1-comments-area .wp-block-comment-date {
    color: #888888;
}

/* ============================================================
   3. Post Views Block
   ============================================================ */
.r1-post-views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666666;
}

.r1-post-views svg { flex-shrink: 0; opacity: 0.7; }

/* ============================================================
   4. Blog Index
   ============================================================ */
.r1-blog-banner-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.r1-blog-banner-desc {
    font-size: 18px;
    opacity: 0.7;
    color: #a0a0a0;
}

.r1-blog-card {
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius-lg);
    overflow: hidden;
    box-shadow: var(--r1-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.r1-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--r1-shadow-hover);
    border-color: var(--r1-border-hover);
}

.r1-blog-card-thumb {
    overflow: hidden;
}

.r1-blog-card-thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.r1-blog-card:hover .r1-blog-card-thumb img {
    transform: scale(1.04);
}

.r1-blog-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.r1-blog-card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

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

.r1-blog-card-date { font-size: 13px; color: #666666; }
.r1-blog-card-views .r1-post-views { color: #666666; }
.r1-blog-card-excerpt { font-size: 14px; color: #888888; line-height: 1.6; }

/* Query pagination */
.wp-block-query-pagination {
    gap: 8px;
}

.wp-block-query-pagination-numbers .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius);
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--r1-transition);
}

.wp-block-query-pagination-numbers .page-numbers:hover {
    background: var(--r1-surface-hover);
    border-color: var(--r1-border-hover);
    color: #ffffff;
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background: var(--r1-accent);
    color: #ffffff;
    border-color: var(--r1-accent);
}

.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
    color: #a0a0a0;
    transition: color 0.2s;
}

.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
    color: #ffffff;
}

/* ============================================================
   5. Archive
   ============================================================ */
.r1-archive-banner-title {
    font-size: 42px;
    font-weight: 800;
}

.r1-archive-banner-desc {
    font-size: 18px;
    opacity: 0.7;
    color: #a0a0a0;
}

.r1-archive-card {
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius-lg);
    overflow: hidden;
    box-shadow: var(--r1-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.r1-archive-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--r1-shadow-hover);
    border-color: var(--r1-border-hover);
}

.r1-archive-card-thumb { overflow: hidden; }
.r1-archive-card-thumb img { transition: transform 0.4s ease; }
.r1-archive-card:hover .r1-archive-card-thumb img { transform: scale(1.04); }

.r1-archive-card-title a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

.r1-archive-card-title a:hover { color: var(--r1-accent); }
.r1-archive-card-date { font-size: 13px; color: #666666; }
.r1-archive-card-excerpt { font-size: 14px; color: #888888; }

.r1-archive-sidebar-wrap {
    width: 340px;
    flex-shrink: 0;
}

@media (max-width: 1024px) { .r1-archive-sidebar-wrap { width: 300px; } }
@media (max-width: 768px) {
    .r1-archive-layout { flex-direction: column; }
    .r1-archive-sidebar-wrap { width: 100%; padding-left: 0 !important; }
    .r1-archive-banner-title { font-size: 32px; }
}

/* ============================================================
   6. Sidebar
   ============================================================ */
.r1-sidebar { width: 340px; flex-shrink: 0; }

.r1-sidebar-section {
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius-lg);
    margin-bottom: 24px;
}

.r1-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--r1-border);
}

.r1-sidebar-section p {
    color: #a0a0a0;
}

/* Top Posts Block */
.r1-top-posts { list-style: none; padding: 0; margin: 0; }

.r1-top-posts-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--r1-border);
    align-items: flex-start;
}

.r1-top-posts-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.r1-top-posts-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: var(--r1-radius);
}

.r1-top-posts-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.r1-top-posts-info { flex: 1; min-width: 0; }

.r1-top-posts-title {
    color: #d4d4d4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.r1-top-posts-title:hover { color: var(--r1-accent); }
.r1-top-posts-date { font-size: 12px; color: #666666; }

/* TOC Block */
.r1-auto-toc details { margin: 0; }
.r1-auto-toc summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #ffffff;
    padding: 4px 0;
    list-style: none;
}
.r1-auto-toc summary::-webkit-details-marker { display: none; }

.r1-toc-list { list-style: none; padding: 0; margin: 8px 0 0; }
.r1-toc-item { margin-bottom: 6px; line-height: 1.4; }
.r1-toc-item a { color: #a0a0a0; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.r1-toc-item a:hover { color: var(--r1-accent); }
.r1-toc-h3 { padding-left: 16px; }

/* Category Tree Block */
.r1-category-tree { list-style: none; padding: 0; margin: 0; }
.r1-category-tree li {
    border-bottom: 1px solid var(--r1-border);
    padding: 10px 0;
}
.r1-category-tree li:last-child { border-bottom: none; }
.r1-category-tree li a { color: #a0a0a0; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.r1-category-tree li a:hover,
.r1-category-tree li.r1-current-cat a { color: var(--r1-accent); font-weight: 600; }
.r1-category-tree .r1-category-tree { padding-left: 16px; margin-top: 4px; }

.r1-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 14px;
    color: #666666;
    cursor: pointer;
    user-select: none;
    float: right;
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .r1-single-layout,
    .r1-archive-layout { flex-direction: column; }
    .r1-sidebar { width: 100%; }
}

/* ============================================================
   7. Search Results
   ============================================================ */
.r1-search-title { font-size: 32px; font-weight: 700; color: #ffffff; }
.r1-search-form { max-width: 520px; margin: 0 auto; }

.r1-search-form input,
.r1-search-form .wp-block-search__input {
    background: var(--r1-surface) !important;
    border: 1px solid var(--r1-border) !important;
    color: #e5e5e5 !important;
    border-radius: var(--r1-radius) !important;
}

.r1-search-form button,
.r1-search-form .wp-block-search__button {
    background: var(--r1-accent) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 var(--r1-radius) var(--r1-radius) 0 !important;
}

.r1-search-card {
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius-lg);
    overflow: hidden;
    box-shadow: var(--r1-shadow);
    transition: var(--r1-transition);
    margin-bottom: 16px;
}

.r1-search-card:hover { box-shadow: var(--r1-shadow-hover); transform: translateY(-2px); border-color: var(--r1-border-hover); }
.r1-search-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.r1-search-card-body { flex: 1; padding: 16px 20px; }
.r1-search-card-title a { color: #ffffff; text-decoration: none; font-size: 18px; font-weight: 600; }
.r1-search-card-title a:hover { color: var(--r1-accent); }
.r1-search-card-excerpt { font-size: 14px; color: #888888; line-height: 1.6; }
.r1-search-card-meta { font-size: 13px; color: #666666; gap: 12px; }
.r1-search-no-results { font-size: 16px; color: #888888; }

@media (max-width: 767px) {
    .r1-search-card { flex-direction: column; }
    .r1-search-card-title a { font-size: 16px; }
}

/* ============================================================
   8. 404 Page
   ============================================================ */
.r1-404-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
}

.r1-404-icon { margin-bottom: 24px; opacity: 0.3; }
.r1-404-title { font-size: 28px; font-weight: 700; color: #ffffff; margin: 0 0 8px; }
.r1-404-desc { font-size: 16px; color: #888888; margin: 0 0 32px; }
.r1-404-search { max-width: 440px; width: 100%; margin-bottom: 24px; }

.r1-404-search input,
.r1-404-search .wp-block-search__input {
    background: var(--r1-surface) !important;
    border: 1px solid var(--r1-border) !important;
    color: #e5e5e5 !important;
    border-radius: var(--r1-radius) !important;
}

.r1-404-search button,
.r1-404-search .wp-block-search__button {
    background: var(--r1-accent) !important;
    color: #ffffff !important;
}

/* ============================================================
   9. Product Hero Block
   ============================================================ */
.r1-product-hero { padding: 20px 0 0; }

.r1-product-hero-inner {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.r1-product-gallery { flex: 1; min-width: 0; max-width: 520px; }

.r1-product-main-image {
    background: var(--r1-surface);
    border-radius: var(--r1-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
    border: 1px solid var(--r1-border);
}

.r1-product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.2s ease;
}

.r1-product-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }

.r1-thumb-btn {
    width: 68px;
    height: 68px;
    border: 2px solid transparent;
    border-radius: var(--r1-radius);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--r1-surface);
    opacity: 0.5;
    transition: all 0.2s;
}

.r1-thumb-btn.active, .r1-thumb-btn:hover {
    opacity: 1;
    border-color: var(--r1-accent);
}

.r1-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

.r1-product-no-image {
    background: var(--r1-surface);
    border-radius: var(--r1-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    border: 1px solid var(--r1-border);
}

.r1-product-info { flex: 1; min-width: 0; }

.r1-product-title {
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin: 0 0 12px;
}

.r1-product-subtitle {
    font-size: 17px;
    color: #888888;
    margin: 0 0 12px;
}

.r1-product-sku {
    font-size: 13px;
    color: #666666;
    font-family: monospace;
    margin: 0 0 20px;
}

.r1-product-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #a0a0a0;
    margin: 0 0 28px;
}

.r1-product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.r1-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--r1-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--r1-transition);
    cursor: pointer;
    border: none;
}

.r1-btn-pdf {
    background: var(--r1-surface);
    color: #d4d4d4;
    border: 1px solid var(--r1-border);
}

.r1-btn-pdf:hover { background: var(--r1-surface-hover); border-color: var(--r1-border-hover); }

.r1-product-body { flex: 1; min-width: 0; }

.r1-product-body h2 {
    color: #ffffff;
}

.r1-product-body p {
    color: #d4d4d4;
}

.r1-product-sidebar-wrap {
    width: 340px;
    flex-shrink: 0;
}

.r1-product-cta-desc { color: #888888; }

@media (max-width: 1024px) { .r1-product-sidebar-wrap { width: 300px; } }
@media (max-width: 768px) {
    .r1-product-hero-inner { flex-direction: column; gap: 24px; }
    .r1-product-layout { flex-direction: column; }
    .r1-product-sidebar-wrap { width: 100%; padding-left: 0 !important; }
    .r1-product-gallery { max-width: 100%; }
    .r1-product-title { font-size: 24px; }
}

/* ============================================================
   10. Product Grid Block
   ============================================================ */
.r1-product-grid {
    display: grid;
    grid-template-columns: repeat(var(--r1-grid-columns, 3), 1fr);
    gap: 24px;
    margin: 32px 0;
}

.r1-product-card {
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: block;
}

.r1-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--r1-shadow-hover);
    border-color: var(--r1-border-hover);
}

.r1-product-card-thumb { overflow: hidden; }
.r1-product-card-thumb img { width: 100%; height: auto; display: block; transition: transform 0.4s; }
.r1-product-card:hover .r1-product-card-thumb img { transform: scale(1.05); }

.r1-product-card-body { padding: 16px 20px 20px; }
.r1-product-card-title { font-size: 16px; font-weight: 600; color: #ffffff; margin: 0 0 4px; line-height: 1.3; }
.r1-product-card-subtitle { font-size: 13px; color: #888888; margin: 0; }

.r1-product-pagination { text-align: center; margin: 32px 0; }

.r1-product-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    background: var(--r1-surface);
    border: 1px solid var(--r1-border);
    border-radius: var(--r1-radius);
    color: #a0a0a0;
    font-size: 14px;
    text-decoration: none;
    transition: var(--r1-transition);
}

.r1-product-pagination .page-numbers:hover {
    background: var(--r1-surface-hover);
    border-color: var(--r1-border-hover);
    color: #ffffff;
}

.r1-product-pagination .page-numbers.current {
    background: var(--r1-accent);
    color: #fff;
    border-color: var(--r1-accent);
}

@media (max-width: 768px) { .r1-product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .r1-product-grid { grid-template-columns: 1fr; } }

/* ============================================================
   11. Breadcrumbs
   ============================================================ */
.r1-breadcrumbs {
    font-size: 14px;
    padding: 16px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: #666666;
}

.r1-breadcrumbs a {
    color: #888888;
    text-decoration: none;
    transition: color 0.2s;
}

.r1-breadcrumbs a:hover { color: var(--r1-accent); }
.r1-breadcrumb-sep { color: #444444; font-size: 12px; }
.r1-breadcrumb-current { color: #d4d4d4; font-weight: 600; }

/* ============================================================
   12. Category Hero Block
   ============================================================ */
.r1-category-hero {
    padding: 80px 24px;
    text-align: center;
    background-color: #111111;
    background-size: cover;
    background-position: center;
}

.r1-category-hero-inner { max-width: 800px; margin: 0 auto; }

.r1-category-hero .r1-breadcrumbs { justify-content: center; margin-bottom: 16px; }

.r1-category-hero-title {
    font-size: 40px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.r1-category-hero-desc {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
    color: #a0a0a0;
}

@media (max-width: 768px) {
    .r1-category-hero { padding: 48px 16px; }
    .r1-category-hero-title { font-size: 28px; }
}

/* ============================================================
   13. Footer
   ============================================================ */
.r1-footer {
    background-color: #0a0a0a;
    color: #888888;
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid var(--r1-border);
}

.r1-footer h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.r1-footer p { margin: 0; }
.r1-footer ul { list-style: none; padding: 0; margin: 0; }
.r1-footer ul li { margin-bottom: 10px; }
.r1-footer ul li a { color: #888888; text-decoration: none; transition: color 0.2s; }
.r1-footer ul li a:hover { color: #ffffff; }

.r1-footer-logo { max-width: 160px; height: auto; }
.r1-footer-tagline { color: #888888; font-size: 13px; line-height: 1.6; }

.r1-footer-contact-item { margin-bottom: 10px; font-size: 14px; }
.r1-footer-contact-item strong { color: #d4d4d4; font-weight: 500; }

.r1-footer-categories { list-style: none; padding: 0; margin: 0; }
.r1-footer-categories li { margin-bottom: 10px; }
.r1-footer-categories li a { color: #888888; text-decoration: none; transition: color 0.2s; }
.r1-footer-categories li a:hover { color: #ffffff; }

.r1-footer-links { list-style: none; padding: 0; }
.r1-footer-links li { margin-bottom: 10px; }
.r1-footer-links li a { color: #888888; text-decoration: none; transition: color 0.2s; }
.r1-footer-links li a:hover { color: #ffffff; }

.r1-footer .wp-block-separator { border: none; height: 1px; }

.r1-footer-bottom {
    font-size: 13px;
    color: #555555;
}

/* Mobile sticky contact */
.r1-mobile-contact-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(10,10,10,0.95), rgba(10,10,10,0));
    padding: 12px 20px 20px;
    z-index: 9999;
    display: none;
}

@media (max-width: 768px) {
    .r1-mobile-contact-bar { display: block; }
    .r1-footer-grid { flex-direction: column; gap: 32px; }
}

/* ============================================================
   14. Form & Button Overrides (R1 Toolkit Forms)
   ============================================================ */
.r1-form-wrap,
.r1-form-wrap * {
    box-sizing: border-box;
}

.r1-popup-btn,
.r1-form-wrap button[type="submit"],
.wp-block-button__link {
    transition: var(--r1-transition);
}

/* Search overlay */
.r1-search-overlay {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

/* Global link override for dark backgrounds */
.r1-footer a,
.r1-sidebar a,
.r1-blog-card a,
.r1-archive-card a,
.r1-product-card a,
.r1-search-card a {
    transition: color 0.2s;
}

/* Page template - base dark */
.r1-page-content {
    color: #d4d4d4;
}

.r1-page-content h1 {
    color: #ffffff;
}

.r1-page-content p {
    color: #d4d4d4;
}

/* ============================================================
   15. Separator Overrides
   ============================================================ */
.wp-block-separator {
    border-color: var(--r1-border) !important;
}

.wp-block-separator.has-text-color {
    background-color: var(--r1-border) !important;
}

/* ============================================================
   16. WordPress Core Block Overrides (Dark)
   ============================================================ */
.wp-block-quote {
    border-left-color: var(--r1-accent);
    color: #d4d4d4;
}

.wp-block-table th {
    background: var(--r1-surface);
    color: #e5e5e5;
    border-color: var(--r1-border);
}

.wp-block-table td {
    border-color: var(--r1-border);
    color: #d4d4d4;
}

.wp-block-file a {
    color: var(--r1-accent);
}

/* Search block input */
.wp-block-search__input {
    background: var(--r1-surface) !important;
    border: 1px solid var(--r1-border) !important;
    color: #e5e5e5 !important;
}

.wp-block-search__input::placeholder {
    color: #666666;
}

.wp-block-search__button {
    background: var(--r1-accent) !important;
    color: #ffffff !important;
}

/* Buttons block */
.wp-block-button.is-style-outline .wp-block-button__link {
    color: #d4d4d4;
    border-color: var(--r1-border);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--r1-border-hover);
    color: #ffffff;
}

/* ============================================================
   17. Theme Toggle Button
   ============================================================ */
.r1-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    background: transparent;
    color: var(--r1-muted);
    transition: var(--r1-transition);
    padding: 0;
    line-height: 1;
}

.r1-theme-toggle:hover {
    color: var(--r1-text);
    background: var(--r1-surface-hover);
}

.r1-theme-toggle svg {
    width: 20px;
    height: 20px;
}

.r1-theme-toggle .icon-moon { display: block; }
.r1-theme-toggle .icon-sun  { display: none; }

html[data-theme="light"] .r1-theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .r1-theme-toggle .icon-sun  { display: block; }

/* ============================================================
   18. Light Theme Overrides
   ============================================================ */
:root {
    --r1-light-bg: #ffffff;
    --r1-light-surface: #f5f5f5;
    --r1-light-surface-hover: #ebebeb;
    --r1-light-border: rgba(0, 0, 0, 0.1);
    --r1-light-border-hover: rgba(0, 0, 0, 0.2);
    --r1-light-text: #444444;
    --r1-light-muted: #777777;
    --r1-light-heading: #111111;
    --r1-light-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --r1-light-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] {
    --r1-bg: var(--r1-light-bg);
    --r1-surface: var(--r1-light-surface);
    --r1-surface-hover: var(--r1-light-surface-hover);
    --r1-border: var(--r1-light-border);
    --r1-border-hover: var(--r1-light-border-hover);
    --r1-text: var(--r1-light-text);
    --r1-muted: var(--r1-light-muted);
    --r1-shadow: var(--r1-light-shadow);
    --r1-shadow-hover: var(--r1-light-shadow-hover);
}

html[data-theme="light"] body {
    background-color: var(--r1-light-bg);
    color: var(--r1-light-text);
}

html[data-theme="light"] ::selection {
    background: rgba(59, 130, 246, 0.2);
    color: #111111;
}

/* -- Header & Nav -- */
html[data-theme="light"] .r1-header {
    background-color: rgba(255, 255, 255, 0.88);
    border-bottom-color: var(--r1-light-border);
}

html[data-theme="light"] .r1-header .wp-block-navigation-item a {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-header .wp-block-navigation-item:hover a,
html[data-theme="light"] .r1-header .wp-block-navigation-item.current-menu-item a {
    color: var(--r1-light-heading);
    background-color: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .r1-header .wp-block-navigation__submenu-container {
    background-color: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--r1-light-border);
}

html[data-theme="light"] .r1-header .wp-block-navigation__submenu-container a {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-header .wp-block-navigation__submenu-container a:hover {
    color: var(--r1-light-heading);
    background: rgba(0, 0, 0, 0.03);
}

/* -- Single Post -- */
html[data-theme="light"] .r1-single-title {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-single-meta {
    color: var(--r1-light-muted);
}

html[data-theme="light"] .r1-single-content .wp-block-post-content {
    color: #333333;
}

html[data-theme="light"] .r1-single-content .wp-block-post-content h2,
html[data-theme="light"] .r1-single-content .wp-block-post-content h3 {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-single-content .wp-block-post-content p,
html[data-theme="light"] .r1-single-content .wp-block-post-content ul,
html[data-theme="light"] .r1-single-content .wp-block-post-content ol {
    color: #333333;
}

html[data-theme="light"] .r1-single-content .wp-block-post-content blockquote {
    background: var(--r1-light-surface);
    color: #333333;
}

html[data-theme="light"] .r1-single-content .wp-block-post-content code {
    background: var(--r1-light-surface);
    border-color: var(--r1-light-border);
}

html[data-theme="light"] .r1-single-content .wp-block-post-content pre {
    background: var(--r1-light-surface);
    border-color: var(--r1-light-border);
}

html[data-theme="light"] .r1-comments-area {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-comments-area h2 {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-comments-area .wp-block-comment-author-name {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-comments-area .wp-block-comment-content {
    color: #333333;
}

html[data-theme="light"] .r1-comments-area .wp-block-comment-date {
    color: var(--r1-light-muted);
}

/* -- Cards (blog, archive, product, search) -- */
html[data-theme="light"] .r1-blog-card-title a,
html[data-theme="light"] .r1-archive-card-title a,
html[data-theme="light"] .r1-product-card-title,
html[data-theme="light"] .r1-search-card-title a {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-blog-card-title a:hover,
html[data-theme="light"] .r1-archive-card-title a:hover,
html[data-theme="light"] .r1-search-card-title a:hover {
    color: var(--r1-accent);
}

html[data-theme="light"] .r1-blog-card-date,
html[data-theme="light"] .r1-archive-card-date,
html[data-theme="light"] .r1-search-card-meta {
    color: #999999;
}

html[data-theme="light"] .r1-blog-card-excerpt,
html[data-theme="light"] .r1-archive-card-excerpt,
html[data-theme="light"] .r1-search-card-excerpt {
    color: var(--r1-light-muted);
}

/* -- Sidebar -- */
html[data-theme="light"] .r1-sidebar-title {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-sidebar-section p {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-sidebar-section {
    background: var(--r1-light-surface);
    border-color: var(--r1-light-border);
}

html[data-theme="light"] .r1-top-posts-title {
    color: #333333;
}

html[data-theme="light"] .r1-top-posts-date {
    color: #999999;
}

html[data-theme="light"] .r1-toc-item a {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-category-tree li {
    border-bottom-color: var(--r1-light-border);
}

html[data-theme="light"] .r1-category-tree li a {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-category-tree li.r1-current-cat a,
html[data-theme="light"] .r1-category-tree li a:hover {
    color: var(--r1-accent);
}

html[data-theme="light"] .r1-auto-toc summary {
    color: var(--r1-light-heading);
}

/* -- Product Page -- */
html[data-theme="light"] .r1-product-title {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-product-subtitle {
    color: var(--r1-light-muted);
}

html[data-theme="light"] .r1-product-sku {
    color: #999999;
}

html[data-theme="light"] .r1-product-desc {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-product-body h2 {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-product-body p {
    color: #333333;
}

html[data-theme="light"] .r1-product-main-image {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .r1-product-card-subtitle {
    color: var(--r1-light-muted);
}

html[data-theme="light"] .r1-product-cta-desc {
    color: var(--r1-light-muted);
}

/* -- Breadcrumbs -- */
html[data-theme="light"] .r1-breadcrumbs {
    color: #999999;
}

html[data-theme="light"] .r1-breadcrumb-sep {
    color: #cccccc;
}

html[data-theme="light"] .r1-breadcrumb-current {
    color: #333333;
}

/* -- Category Hero -- */
html[data-theme="light"] .r1-category-hero {
    background-color: #f0f0f0;
}

html[data-theme="light"] .r1-category-hero-title {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-category-hero-desc {
    color: var(--r1-light-muted);
}

/* Cover image variant: keep white text on dark overlay in BOTH themes */
.r1-category-hero--has-cover .r1-category-hero-title,
.r1-category-hero--has-cover .r1-category-hero-desc,
.r1-category-hero--has-cover .r1-breadcrumbs,
.r1-category-hero--has-cover .r1-breadcrumbs a,
.r1-category-hero--has-cover .r1-breadcrumb-current,
.r1-category-hero--has-cover .r1-breadcrumb-sep {
    color: #ffffff;
}

html[data-theme="light"] .r1-category-hero--has-cover .r1-category-hero-title,
html[data-theme="light"] .r1-category-hero--has-cover .r1-category-hero-desc,
html[data-theme="light"] .r1-category-hero--has-cover .r1-breadcrumbs,
html[data-theme="light"] .r1-category-hero--has-cover .r1-breadcrumbs a,
html[data-theme="light"] .r1-category-hero--has-cover .r1-breadcrumb-current {
    color: #ffffff;
}

/* -- Post Views -- */
html[data-theme="light"] .r1-post-views {
    color: #999999;
}

/* -- Pagination -- */
html[data-theme="light"] .wp-block-query-pagination-numbers .page-numbers {
    color: var(--r1-light-text);
}

html[data-theme="light"] .wp-block-query-pagination-numbers .page-numbers:hover {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .wp-block-query-pagination-previous a,
html[data-theme="light"] .wp-block-query-pagination-next a {
    color: var(--r1-light-text);
}

html[data-theme="light"] .wp-block-query-pagination-previous a:hover,
html[data-theme="light"] .wp-block-query-pagination-next a:hover {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-product-pagination .page-numbers {
    color: var(--r1-light-text);
}

html[data-theme="light"] .r1-product-pagination .page-numbers:hover {
    color: var(--r1-light-heading);
}

/* -- Search Page -- */
html[data-theme="light"] .r1-search-title {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-search-no-results {
    color: var(--r1-light-muted);
}

/* -- 404 Page -- */
html[data-theme="light"] .r1-404-title {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-404-desc {
    color: var(--r1-light-muted);
}

/* -- Footer -- */
html[data-theme="light"] .r1-footer {
    background-color: #f5f5f5;
    color: var(--r1-light-muted);
    border-top-color: var(--r1-light-border);
}

html[data-theme="light"] .r1-footer h4 {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-footer ul li a {
    color: var(--r1-light-muted);
}

html[data-theme="light"] .r1-footer ul li a:hover {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-footer-contact-item strong {
    color: #333333;
}

html[data-theme="light"] .r1-footer-categories li a {
    color: var(--r1-light-muted);
}

html[data-theme="light"] .r1-footer-categories li a:hover {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-footer-links li a {
    color: var(--r1-light-muted);
}

html[data-theme="light"] .r1-footer-links li a:hover {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-footer-bottom {
    color: #999999;
}

/* -- Blog / Archive Banner -- */
html[data-theme="light"] .r1-blog-banner-desc,
html[data-theme="light"] .r1-archive-banner-desc {
    color: var(--r1-light-muted);
}

/* -- Page Template -- */
html[data-theme="light"] .r1-page-content {
    color: #333333;
}

html[data-theme="light"] .r1-page-content h1 {
    color: var(--r1-light-heading);
}

html[data-theme="light"] .r1-page-content p {
    color: #333333;
}

/* -- WordPress Core Blocks (Light) -- */
html[data-theme="light"] .wp-block-quote {
    color: #333333;
}

html[data-theme="light"] .wp-block-table th {
    background: var(--r1-light-surface);
    color: var(--r1-light-heading);
    border-color: var(--r1-light-border);
}

html[data-theme="light"] .wp-block-table td {
    border-color: var(--r1-light-border);
    color: #333333;
}

html[data-theme="light"] .wp-block-search__input {
    background: var(--r1-light-surface) !important;
    border-color: var(--r1-light-border) !important;
    color: var(--r1-light-heading) !important;
}

html[data-theme="light"] .wp-block-search__input::placeholder {
    color: #999999;
}

html[data-theme="light"] .wp-block-button.is-style-outline .wp-block-button__link {
    color: var(--r1-light-text);
    border-color: var(--r1-light-border);
}

html[data-theme="light"] .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--r1-light-border-hover);
    color: var(--r1-light-heading);
}

/* -- WP mobile overlay (stays dark) -- */
html[data-theme="light"] .wp-block-navigation__responsive-container.is-menu-open {
    background-color: #ffffff !important;
}

html[data-theme="light"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
    color: var(--r1-light-heading);
}

/* -- WP Preset Color Classes (light mode inversion) -- */
/* Text colors: dark-on-dark → light-on-light */
html[data-theme="light"] .has-gray-900-color,
html[data-theme="light"] [style*="color: #e5e5e5"],
html[data-theme="light"] [style*="color:#e5e5e5"] {
    color: #111111 !important;
}

html[data-theme="light"] .has-gray-600-color,
html[data-theme="light"] [style*="color: #a0a0a0"],
html[data-theme="light"] [style*="color:#a0a0a0"] {
    color: #444444 !important;
}

html[data-theme="light"] .has-gray-500-color,
html[data-theme="light"] [style*="color: #888888"],
html[data-theme="light"] [style*="color:#888888"] {
    color: #666666 !important;
}

html[data-theme="light"] .has-white-color,
html[data-theme="light"] [style*="color: #0a0a0a"],
html[data-theme="light"] [style*="color:#0a0a0a"] {
    color: #111111 !important;
}

/* Background colors: dark backgrounds → light backgrounds */
html[data-theme="light"] .has-gray-50-background-color {
    background-color: #ffffff;
}

html[data-theme="light"] .has-gray-100-background-color {
    background-color: #f5f5f5;
}

html[data-theme="light"] .has-gray-200-background-color {
    background-color: #ebebeb;
}

html[data-theme="light"] .has-white-background-color {
    background-color: #ffffff;
}
