/*!
Theme Name: Spider Theme
Theme URI: https://spider-themes.net/
Author: Spider Themes
Author URI: https://spider-themes.net/
Description: Companion WordPress theme for the Spider Theme Core plugin. Modern marketplace-ready header, footer, blog, and 404 design for a premium digital product marketplace.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: spider-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, marketplace
*/

/* =========================================================================
   1. Design tokens
   ========================================================================= */
:root {
    /* Brand */
    --st-primary: #22c55e;
    --st-primary-hover: #16a34a;
    --st-primary-soft: rgba(34, 197, 94, 0.12);

    /* Surfaces */
    --st-bg: #f8fafc;
    --st-surface: #ffffff;
    --st-surface-alt: #f9fafb;
    --st-dark: #111827;
    --st-dark-alt: #0f172a;

    /* Text */
    --st-heading: #0f172a;
    --st-text: #334155;
    --st-muted: #64748b;
    --st-on-dark: #e5e7eb;

    /* Border */
    --st-border: #e5e7eb;
    --st-border-light: #f1f5f9;

    /* Layout */
    --st-container: 1480px;
    --st-radius-sm: 8px;
    --st-radius: 12px;
    --st-radius-lg: 18px;
    --st-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
    --st-shadow-md: 0 12px 28px rgba(15, 23, 42, 0.08);
    --st-shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12);

    /* Type — families */
    --st-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --st-font-heading: var(--st-font);
    --st-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

    /* Type — scale */
    --st-text-xs:   0.75rem;    /* 12px */
    --st-text-sm:   0.8125rem;  /* 13px */
    --st-text-base: 0.9375rem;  /* 15px */
    --st-text-lg:   1.125rem;   /* 18px */
    --st-text-xl:   1.25rem;    /* 20px */
    --st-text-2xl:  1.75rem;    /* 28px */
    --st-text-3xl:  2.5rem;     /* 40px */

    /* Type — weight */
    --st-fw-normal:    400;
    --st-fw-medium:    500;
    --st-fw-semibold:  600;
    --st-fw-bold:      700;
    --st-fw-extrabold: 800;

    /* Type — line-height */
    --st-leading-tight:   1.18;
    --st-leading-snug:    1.35;
    --st-leading-normal:  1.5;
    --st-leading-relaxed: 1.65;

    /* Spacing scale (4px base) */
    --st-space-1:  0.25rem;   /*  4px */
    --st-space-2:  0.5rem;    /*  8px */
    --st-space-3:  0.75rem;   /* 12px */
    --st-space-4:  1rem;      /* 16px */
    --st-space-5:  1.25rem;   /* 20px */
    --st-space-6:  1.5rem;    /* 24px */
    --st-space-8:  2rem;      /* 32px */
    --st-space-10: 2.5rem;    /* 40px */
    --st-space-12: 3rem;      /* 48px */
    --st-space-16: 4rem;      /* 64px */
    --st-space-20: 5rem;      /* 80px */

    /* Status colors */
    --st-success:      #22c55e;
    --st-success-soft: rgba(34, 197, 94, 0.12);
    --st-warning:      #f59e0b;
    --st-warning-soft: rgba(245, 158, 11, 0.12);
    --st-error:        #ef4444;
    --st-error-soft:   rgba(239, 68, 68, 0.12);
    --st-info:         #3b82f6;
    --st-info-soft:    rgba(59, 130, 246, 0.12);

    /* Z-index scale */
    --st-z-dropdown: 100;
    --st-z-sticky:   200;
    --st-z-overlay:  300;
    --st-z-modal:    400;
    --st-z-toast:    500;
}

/* Allow the plugin (--stc-primary) to override the theme primary if set. */
:root {
    --st-primary: var(--stc-primary, #22c55e);
    --st-primary-hover: var(--stc-primary-hover, #16a34a);
}

/* =========================================================================
   2. Reset / base
   ========================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--st-font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--st-text);
    background: var(--st-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--st-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:where(:not(.wp-element-button)){
	text-decoration: none !important;
}
a:hover,
a:focus {
    color: var(--st-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--st-font-heading);
    color: var(--st-heading);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 800;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 1rem; }

ul, ol { padding-left: 1.25rem; }

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--st-primary);
    outline-offset: 2px;
}
.wp-block-table td, .wp-block-table th {
    border: 1px solid #d5d5d5;
}
ul.st-about__socials li+ li {
    margin: 0;
}
/* Skip link */
.skip-link.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: -9999px;
    z-index: 10000;
}
.skip-link.screen-reader-text:focus {
    left: 16px;
    top: 16px;
    background: var(--st-surface);
    color: var(--st-heading);
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: var(--st-shadow-md);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* =========================================================================
   3. Layout helpers
   ========================================================================= */
.st-container {
    width: 100%;
    max-width: var(--st-container);
    margin: 0 auto;
    padding: 0 24px;
}

.st-section {
    padding: 56px 0;
}

@media (max-width: 768px) {
    .st-section { padding: 40px 0; }
    .st-container { padding: 0 16px; }
}

/* =========================================================================
   4. Buttons
   ========================================================================= */
.st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--st-radius-sm);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.st-btn--primary {
    background: linear-gradient(135deg, var(--st-primary), var(--st-primary-hover));
    color: #fff;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.25);
}
.st-btn--primary:hover,
.st-btn--primary:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.32);
}

.st-btn--ghost {
    background: var(--st-surface);
    border-color: var(--st-border);
    color: var(--st-heading);
}
.st-btn--ghost:hover {
    border-color: var(--st-primary);
    color: var(--st-primary-hover);
}

.st-btn--dark {
    background: var(--st-dark);
    color: #fff;
}
.st-btn--dark:hover {
    background: var(--st-dark-alt);
    color: #fff;
}

/* =========================================================================
   5. Header
   ========================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--st-border-light);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ---- Hamburger toggles (mobile menu / desktop categories) ---- */
.site-header__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--st-border-light);
    background: var(--st-surface);
    border-radius: 10px;
    color: var(--st-heading);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    order: 1;
}
.site-header__menu-toggle:hover {
    background: var(--st-surface-alt);
    color: var(--st-primary-hover);
}
.site-header__menu-toggle .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

/* Default: show desktop categories toggle, hide mobile menu toggle.
   This matches the user's spec: mobile shows the mobile menu icon,
   tablet/laptop/desktop show the categories icon. */
.site-header__menu-toggle--mobile { display: none; }
.site-header__menu-toggle--categories { display: inline-flex; }

/* ---- Branding / logo ---- */
.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    order: 0;
}

.site-branding__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-branding__mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--st-primary), var(--st-primary-hover));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.site-branding__text {
    font-size: 20px;
    font-weight: 900;
    color: var(--st-heading);
    line-height: 1;
    letter-spacing: -0.02em;
}

.site-branding .custom-logo-link,
.site-branding__logo--image {
    display: inline-flex;
    align-items: center;
}

.site-branding .custom-logo,
.site-branding__logo--image .custom-logo {
    max-height: 40px;
    width: auto;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .site-branding .custom-logo,
    .site-branding__logo--image .custom-logo {
        max-height: 32px;
    }
}

.site-title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

.site-title a { color: var(--st-heading); }
.site-title a:hover { color: var(--st-primary-hover); }

.site-description {
    margin: 0;
    font-size: 12px;
    color: var(--st-muted);
}

/* ---- Primary nav ---- */
.main-navigation {
    flex-shrink: 0;
    order: 2;
}

.main-navigation__panel {
    display: flex;
}

.main-navigation__close {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--st-border-light);
    background: var(--st-surface);
    border-radius: 8px;
    color: var(--st-heading);
    cursor: pointer;
    z-index: 5;
    pointer-events: auto;
}
.main-navigation__close:hover {
    background: var(--st-surface-soft, #f8fafc);
    border-color: var(--st-border-strong, #e2e8f0);
}
.main-navigation__close .dashicons { font-size: 18px; width: 18px; height: 18px; }

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.main-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--st-text);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.main-navigation a:hover{
    color: var(--st-primary-hover);
}

.main-navigation .menu-item-has-children > a::after {
    content: "\f347";
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
    margin-left: 2px;
    color: var(--st-muted);
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 8px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    box-shadow: var(--st-shadow-md);
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s;
}

.main-navigation li.menu-item-has-children {
    position: relative;
}

.main-navigation li.menu-item-has-children:hover > .sub-menu,
.main-navigation li.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.main-navigation .sub-menu a { width: 100%; padding: 8px 12px; }
.main-navigation .sub-menu .menu-item-has-children > a::after { display: none; }

/* JS-injected accordion chevrons are mobile-only; hide everywhere by default. */
.main-navigation .menu-item-toggle { display: none; }

/* ---- Menu item icon (Dashicon prepended via filter) ---- */
.main-navigation .st-menu-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--st-muted);
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.main-navigation a:hover .st-menu-icon,
.main-navigation .current-menu-item > a .st-menu-icon {
    color: var(--st-primary-hover);
}
.main-navigation .st-menu-label { display: inline; }

/* =========================================================================
   Mega menu
   ========================================================================= */
/* Mega panel: anchored to the trigger item's left edge so the panel
   starts where the menu item starts. */
.main-navigation li.menu-item-has-children.has-mega-menu {
    position: relative;
}

.main-navigation .has-mega-menu > .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: none;
    /* Cap by viewport so the panel never overflows. Width otherwise
       grows with content via the per-cols-* rules below. */
    max-width: min(var(--st-mega-width, 1170px), calc(100vw - 32px));
    box-sizing: border-box;
    padding: 18px;
    border-radius: var(--st-mega-radius, 12px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
    border: 1px solid var(--st-border-light);
    background: var(--st-mega-bg, var(--st-surface));
    display: grid;
    gap: 14px 20px;
    align-items: start;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s;
    z-index: 90;
}
.main-navigation .has-mega-menu:hover > .sub-menu,
.main-navigation .has-mega-menu:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Reset inner sub-menus inside ANY mega panel so they flow inline as
   columns instead of inheriting the desktop dropdown's absolute position
   (this guards against menus where .mega-column class isn't emitted).
   IMPORTANT: visibility/opacity must INHERIT from the outer panel, otherwise
   the inner lists stay pointer-active when the panel is hidden and any
   hover on their hit-area would re-open the mega menu. */
.main-navigation .has-mega-menu > .sub-menu .sub-menu {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: inherit;
    visibility: inherit;
    transition: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Column counts: each track has a sensible min so columns never collapse
   on top of each other, and a soft max so panels stay compact. */
.main-navigation .mega-cols-1 > .sub-menu {
    grid-template-columns: 1fr;
    width: max-content;
    min-width: min(280px, calc(100vw - 48px));
    padding: 8px;
    gap: 0;
    border-radius: 10px;
}
.main-navigation .mega-cols-2 > .sub-menu {
    width: max-content;
    grid-template-columns: repeat(2, minmax(160px, 220px));
}
.main-navigation .mega-cols-3 > .sub-menu {
    width: max-content;
    grid-template-columns: repeat(3, minmax(150px, 210px));
}
.main-navigation .mega-cols-4 > .sub-menu {
    width: max-content;
    grid-template-columns: repeat(4, minmax(140px, 200px));
}
.main-navigation .mega-cols-5 > .sub-menu {
    width: max-content;
    grid-template-columns: repeat(5, minmax(140px, 190px));
}

/* Reflow wide megas on narrower desktop (primary nav visible above 1024px). */
@media (max-width: 1320px) {
    .main-navigation .mega-cols-5 > .sub-menu {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
    .main-navigation .mega-cols-4 > .sub-menu {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}
@media (max-width: 1160px) {
    .main-navigation .mega-cols-5 > .sub-menu,
    .main-navigation .mega-cols-4 > .sub-menu,
    .main-navigation .mega-cols-3 > .sub-menu {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

/* ---- 1-column mega: simple icon list (Browse-style) ---- */
.main-navigation .mega-cols-1 .mega-column { width: 100%; }
.main-navigation .mega-cols-1 .mega-column > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--st-text);
    line-height: 1.3;
}
.main-navigation .mega-cols-1 .mega-column > a::after {
    content: "\f345";
    font-family: dashicons;
    margin-left: auto;
    color: var(--st-muted);
    font-size: 18px;
}
.main-navigation .mega-cols-1 .mega-column > a:hover {
    background: var(--st-primary-soft);
    color: var(--st-primary-hover);
}
.main-navigation .mega-cols-1 .mega-column > a:hover::after {
    color: var(--st-primary-hover);
}
.main-navigation .mega-cols-1 .mega-column > a .st-menu-icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: var(--st-primary-hover);
}

/* ---- Multi-column mega: column heading + sublinks ---- */
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column {
    display: block;
    padding: 0;
    background: transparent;
}
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--st-border-light);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--st-heading);
    line-height: 1.2;
    background: transparent !important;
    border-radius: 0;
}
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column > a:hover {
    color: var(--st-primary-hover);
}
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column > a::after {
    display: none;
}
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column > a .st-menu-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--st-primary-hover);
}

/* The list of links inside a column flows naturally */
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column > .sub-menu {
    position: static;
    transform: none;
    /* Must follow the outer mega panel — do not force visible or the
       column lists stay hit-testable while the panel is "closed" and
       :hover on the parent <li> fires from unrelated areas (e.g. search). */
    opacity: inherit;
    visibility: inherit;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0;
    min-width: 0;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: none;
}
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-link a,
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column > .sub-menu a {
    padding: 7px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--st-text);
    background: transparent;
    border-radius: 0;
}
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-link a:hover,
.main-navigation .has-mega-menu:not(.mega-cols-1) .mega-column > .sub-menu a:hover {
    color: var(--st-primary-hover);
    background: transparent;
}

.site-header__search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 520px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--st-surface-alt);
    border: 1px solid transparent;
    border-radius: 999px;
    height: 44px;
    padding: 0 18px 0 44px;
    transition: all 0.15s ease;
    order: 3;
    margin: 0 auto;
}
.site-header__search:focus-within {
    background: var(--st-surface);
    border-color: var(--st-primary);
    box-shadow: 0 0 0 4px var(--st-primary-soft);
}
.site-header__search .dashicons-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--st-muted);
    font-size: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
}
.site-header__search input[type="search"] {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--st-heading);
    height: 100%;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}
.site-header__search input[type="search"]::placeholder { color: var(--st-muted); }
.site-header__search input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---- Header actions (right side) ---- */
.site-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    flex-shrink: 0;
    order: 4;
}

.site-header__actions-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-header__actions-divider {
    width: 1px;
    height: 28px;
    background: var(--st-border);
    flex-shrink: 0;
}

.site-header__icon-link {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--st-heading);
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    box-shadow: var(--st-shadow-sm);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.site-header__icon-link:hover {
    background: var(--st-surface-alt);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--st-primary-hover);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.12);
}
.site-header__icon-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.site-header__badge {
    position: absolute;
    top: -10px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    min-width: 25px;
    padding: 0;
    border-radius: 999px;
    background: var(--st-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    border: 2px solid var(--st-surface);
    box-sizing: border-box;
    pointer-events: none;
}
.site-header__badge--wide {
    width: auto;
    min-width: 17px;
    padding: 0 4px;
}
.site-header__badge.is-empty {
    opacity: 0.72;
}

/* ---- Logged-in / guest: avatar + name + dropdown ---- */
.site-header__user {
    position: relative;
}
.site-header__user > summary {
    list-style: none;
    cursor: pointer;
}
.site-header__user > summary::-webkit-details-marker { display: none; }
.site-header__user > summary::marker { display: none; content: ""; }

.site-header__user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 4px 4px 4px 0;
    border-radius: 999px;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: opacity 0.15s ease;
}
.site-header__user-toggle:hover,
.site-header__user[open] .site-header__user-toggle {
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 0.88;
}

.site-header__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--st-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    flex-shrink: 0;
    overflow: hidden;
}

.site-header__avatar--image {
    background: var(--st-surface-alt);
    padding: 0;
}

.site-header__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.site-header__avatar--guest {
    background: var(--st-surface-alt);
    color: var(--st-muted);
    border: 1px solid var(--st-border-light);
}
.site-header__avatar--guest .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.site-header__user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--st-heading);
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
}

.site-header__user-caret {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--st-muted);
    transition: transform 0.15s ease;
}
.site-header__user[open] .site-header__user-caret {
    transform: rotate(180deg);
}

.site-header__user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 232px;
    max-height: calc(100vh - 100px);
    padding: 8px;
    background: var(--st-surface);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius);
    box-shadow: var(--st-shadow-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 110;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.site-header__user-menu a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--st-text);
    font-size: 14px;
    font-weight: 500;
}
.site-header__user-menu a:hover {
    background: var(--st-surface-alt);
    color: var(--st-primary-hover);
}
.site-header__user-menu a .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--st-muted);
}
.site-header__user-menu a:hover .dashicons {
    color: var(--st-primary-hover);
}
.site-header__user-menu-danger {
    color: var(--st-danger, #dc2626) !important;
    margin-top: 4px;
    border-top: 1px solid var(--st-border-light);
    padding-top: 12px !important;
    border-radius: 0 0 8px 8px !important;
}
.site-header__user-menu-danger .dashicons {
    color: var(--st-danger, #dc2626) !important;
}
.site-header__user-menu-danger:hover {
    background: rgba(220, 38, 38, 0.06) !important;
    color: var(--st-danger, #dc2626) !important;
}

.site-header__user-menu-primary {
    margin-top: 4px;
    background: var(--st-primary) !important;
    color: #fff !important;
    font-weight: 700 !important;
}
.site-header__user-menu-primary:hover {
    background: var(--st-primary-hover) !important;
    color: #fff !important;
}
.site-header__user-menu-primary .dashicons {
    color: #fff !important;
}
.site-header__user-menu-primary:hover .dashicons {
    color: #fff !important;
}

/* ---- Responsive: tablet ---- */
@media (max-width: 1180px) {
    .site-header__inner { gap: 14px; }
    .main-navigation a { padding: 8px 10px; font-size: 13px; }
    .site-header__user-name { max-width: 96px; }
}

/* Primary nav becomes a left off-canvas drawer on mobile + tablet (≤1024px).
   Drawer the <nav> itself (not the inner container) so toggling works
   even if wp_nav_menu didn't render the inner wrapper. */
@media (max-width: 1024px) {
    .main-navigation {
        order: 5;
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 360px);
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        background: var(--st-surface);
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.14);
        padding: 64px 16px 24px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 99;
        flex: 0 0 auto;
        margin: 0;
        display: block;
    }
    .main-navigation.toggled {
        transform: translateX(0);
    }
    .main-navigation__panel {
        display: block;
        width: 100%;
    }
    .main-navigation .menu,
    .main-navigation #primary-menu,
    .main-navigation > ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 2px !important;
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100%;
    }
    .main-navigation li {
        display: block;
        width: 100%;
    }
    .main-navigation.toggled .main-navigation__close { display: inline-flex; }
    /* Push drawer down when the WordPress admin bar is visible. */
    body.admin-bar .main-navigation {
        top: 32px;
        height: calc(100vh - 32px);
        height: calc(100dvh - 32px);
    }
    .main-navigation a {
        width: 100%;
        padding: 12px 14px;
        justify-content: flex-start;
    }
    /* Hide CSS chevron — replaced by JS toggle button on mobile. */
    .main-navigation .menu-item-has-children > a::after { display: none; }

    /* Mobile accordion: parent <li> holds the toggle button; sub-menu collapsed
       by default and only reveals when the parent has .is-open. */
    .main-navigation .menu-item-has-children {
        position: relative;
    }
    .main-navigation .menu-item-has-children > a {
        padding-right: 48px;
    }
    .main-navigation .menu-item-toggle {
        display: inline-flex;
        position: absolute;
        top: 4px;
        right: 4px;
        z-index: 2;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 0;
        border-radius: 8px;
        color: var(--st-text-muted, #6b7280);
        cursor: pointer;
        transition: transform 0.18s ease, background 0.15s ease, color 0.15s ease;
    }
    .main-navigation .menu-item-toggle:hover {
        background: var(--st-surface-soft, #f8fafc);
        color: var(--st-heading, #0f172a);
    }
    .main-navigation .menu-item-toggle .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
        transition: transform 0.18s ease;
    }
    .main-navigation .menu-item-has-children.is-open > .menu-item-toggle .dashicons {
        transform: rotate(180deg);
    }

    .main-navigation .sub-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0 0 0 16px;
        min-width: 0;
        width: 100%;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.22s ease;
    }
    .main-navigation .menu-item-has-children.is-open > .sub-menu {
        max-height: 1500px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    /* Mega menus: override desktop hover panel (opacity/visibility/grid). */
    .main-navigation .has-mega-menu > .sub-menu {
        display: block !important;
        grid-template-columns: 1fr !important;
        min-width: 0 !important;
        max-width: none;
        width: 100%;
        padding: 0 0 0 16px;
        background: transparent;
        box-shadow: none;
        border: 0;
        gap: 0;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: max-height 0.22s ease;
    }
    .main-navigation .has-mega-menu.is-open > .sub-menu {
        padding-top: 4px;
        padding-bottom: 4px;
    }
    /* When mega is open, show all nested lists as one flat stack (no nested accordion). */
    .main-navigation .has-mega-menu.is-open li.menu-item-has-children > .sub-menu,
    .main-navigation .has-mega-menu.is-open .mega-column > .sub-menu {
        max-height: none !important;
        overflow: visible !important;
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .main-navigation .has-mega-menu .sub-menu .menu-item-toggle {
        display: none !important;
    }
    .main-navigation .has-mega-menu .sub-menu .menu-item-has-children > a {
        padding-right: 14px;
    }
    .main-navigation .has-mega-menu .mega-column {
        width: 100%;
        padding: 0;
        border: 0;
    }
    .main-navigation .has-mega-menu .mega-column > a {
        border-bottom: 0;
        margin-bottom: 0;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 600;
        color: var(--st-heading, #0f172a);
        text-transform: none;
        letter-spacing: 0;
    }
    .main-navigation .has-mega-menu .mega-column > a::after { display: none; }
    .main-navigation .has-mega-menu .mega-column > .sub-menu {
        padding: 0 0 0 16px;
    }
    .main-navigation .has-mega-menu .mega-link a,
    .main-navigation .has-mega-menu .mega-column > .sub-menu a {
        padding: 8px 14px;
        font-size: 13px;
        color: var(--st-text, #475569);
        font-weight: 500;
    }

    body.st-nav-open,
    body.st-drawer-open { overflow: hidden; }
}

/* WP admin bar drops to 46px below 782px wide. */
@media (max-width: 782px) {
    body.admin-bar .main-navigation {
        top: 46px;
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

/* (Removed) Inline primary nav wrap rule — at ≤1024px the nav becomes a drawer. */

/* ---- Shared drawer overlay ---- */
.site-header__drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
    z-index: 95;
}
body.st-drawer-open .site-header__drawer-overlay {
    opacity: 1;
    visibility: visible;
}

/* ---- Categories drawer (left off-canvas) ---- */
.site-header__drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(360px, 86vw);
    background: var(--st-surface);
    border-right: 1px solid var(--st-border-light);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.06);
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.site-header__drawer.toggled {
    transform: translateX(0);
}

.site-header__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--st-border-light);
    flex-shrink: 0;
}
.site-header__drawer-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--st-heading);
    letter-spacing: -0.01em;
}
.site-header__drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--st-border-light);
    background: var(--st-surface);
    color: var(--st-heading);
    cursor: pointer;
    transition: all 0.15s ease;
}
.site-header__drawer-close:hover {
    background: var(--st-surface-alt);
    color: var(--st-primary-hover);
}
.site-header__drawer-close .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.site-header__drawer-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px;
}

.site-header__drawer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-header__drawer-nav .sub-menu {
    padding: 4px 0 4px 16px;
    border-left: 2px solid var(--st-border-light);
    margin-left: 12px;
    margin-top: 2px;
}

.site-header__drawer-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--st-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}
.site-header__drawer-nav a:hover,
.site-header__drawer-nav .current-menu-item > a {
    background: var(--st-primary-soft);
    color: var(--st-primary-hover);
}

/* Lock body scroll when any drawer is open (tablet+ as well). */
body.st-drawer-open { overflow: hidden; }

/* ---- Responsive: tablet down to wide mobile (≤1024px) ---- */
@media (max-width: 1024px) {
    .site-header__inner {
        gap: 10px;
        min-height: 64px;
        padding-top: 10px;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }
    /* Swap toggles: show mobile menu, hide categories button. */
    .site-header__menu-toggle--mobile { display: inline-flex; }
    .site-header__menu-toggle--categories { display: none; }
    .site-header__menu-toggle { width: 38px; height: 38px; }
    .site-header__menu-toggle .dashicons { font-size: 20px; width: 20px; height: 20px; }
    .site-branding__mark { width: 28px; height: 28px; font-size: 16px; border-radius: 6px; }
    .site-branding__text { font-size: 17px; }
    .site-header__search { height: 40px; padding-left: 40px; padding-right: 14px; }
    .site-header__search .dashicons-search { left: 14px; }
    .site-header__actions { gap: 8px; }
    .site-header__actions-tools { gap: 6px; }
    .site-header__actions-divider { height: 24px; }
    .site-header__icon-link { width: 38px; height: 38px; }
    .site-header__icon-link .dashicons { font-size: 18px; width: 18px; height: 18px; }
    .site-header__badge {
        top: -6px;
        right: -6px;
        width: 20px;
        height: 20px;
        min-width: 20px;
        font-size: 9px;
    }
    .site-header__badge--wide {
        min-width: 20px;
        padding: 0 3px;
    }
    /* Compact user toggle: hide name + caret, keep avatar */
    .site-header__user-name,
    .site-header__user-caret { display: none; }
    .site-header__user-toggle {
        min-height: 38px;
        padding: 0;
        border: none;
        box-shadow: none;
    }
    .site-header__avatar { width: 34px; height: 34px; }
    .site-header__user-menu { right: 0; min-width: 200px; }
}

/* ---- Responsive: narrow mobile (search wraps to its own row) ---- */
@media (max-width: 600px) {
    .site-header__inner { flex-wrap: wrap; }
    .site-header__search {
        order: 10;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .site-branding__text {
        max-width: 110px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ---- Hide brand text on very small screens to keep things compact ---- */
@media (max-width: 380px) {
    .site-branding__text { display: none; }
}
@media (max-width: 425px) {
    /* Keep cart + wishlist visible but icon-only (no label, no badge text) */
    .site-header__actions-divider,
    .site-header__search {
        display: none;
    }
    .site-header__icon-link.site-header__wishlist,
    .site-header__icon-link.site-header__cart {
        min-width: 36px;
        min-height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .site-header__actions {
        gap: 2px;
        margin-left: 0;
    }
    .site-branding {
        order: 2;
    }
    .site-header__inner {
        justify-content: space-around;
    }
}


/* =========================================================================
   6. Page hero / archive header
   ========================================================================= */
.st-page-hero {
    background: linear-gradient(135deg, var(--st-dark-alt), var(--st-dark));
    color: #fff;
    padding: 72px 0 56px;
    margin-bottom: 40px;
}

.st-page-hero h1,
.st-page-hero .page-title {
    color: #fff;
    margin: 0 0 8px;
}

.st-page-hero p,
.st-page-hero .archive-description {
    color: var(--st-on-dark);
    max-width: 720px;
    margin: 0;
}

.st-page-hero__breadcrumbs {
    display: flex;
    gap: 8px;
    color: rgba(229, 231, 235, 0.7);
    font-size: 13px;
    margin-bottom: 12px;
}

.st-page-hero__breadcrumbs a {
    color: inherit;
}
.st-page-hero__breadcrumbs a:hover { color: #fff; }

@media (max-width: 768px) {
    .st-page-hero {
        padding: 48px 0 32px;
        margin-bottom: 24px;
    }
}

/* Single-post hero variant — slightly tighter, breadcrumbs can wrap. */
.st-page-hero--single .st-page-hero__breadcrumbs {
    flex-wrap: wrap;
    align-items: center;
}
.st-page-hero--single .page-title {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    line-height: 1.18;
    max-width: 920px;
}

/* Single-post entry-meta (rendered inside .st-content-card) */
.entry-meta--single {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0 0 22px;
    color: var(--st-primary);
    font-size: 13px;
    font-weight: 600;
}
.entry-meta--single .entry-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--st-primary);
}
.entry-meta--single .entry-meta__item .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    color: var(--st-primary);
}
.entry-meta--single .entry-meta__item a {
    color: inherit;
    text-decoration: none;
}
.entry-meta--single .entry-meta__item a:hover {
    color: var(--st-primary-hover);
    text-decoration: underline;
}

/* =========================================================================
   7. Post grid + cards
   ========================================================================= */
.site-main {
    padding: 0 0 64px;
}
.site-main--full {
    padding-top: 32px;
}
.site-main--with-sidebar {
    padding-top: 32px;
}

.st-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 1024px) {
    .st-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .st-post-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* Sidebar-aware post list — used on blog/archive/search whenever the
   right widget area is active. Switches to a single column horizontal
   "list" card so the sidebar isn't competing with a 3-up grid. */
.st-post-grid--list {
    grid-template-columns: 1fr;
    gap: 20px;
}
.st-post-grid--list article.post,
.st-post-grid--list article.page {
    flex-direction: row;
    align-items: stretch;
}
.st-post-grid--list article .post-thumbnail {
    flex: 0 0 280px;
    aspect-ratio: 4 / 3;
}
.st-post-grid--list article .post-thumbnail + .entry-header,
.st-post-grid--list article .entry-header {
    padding-top: 22px;
}
.st-post-grid--list article .entry-header,
.st-post-grid--list article .entry-content,
.st-post-grid--list article .entry-summary,
.st-post-grid--list article .entry-footer {
    padding-left: 22px;
    padding-right: 22px;
}
@media (max-width: 1024px) {
    .st-post-grid--list article .post-thumbnail { flex-basis: 220px; }
}
@media (max-width: 768px) {
    .st-post-grid--list article.post,
    .st-post-grid--list article.page {
        flex-direction: column;
    }
    .st-post-grid--list article .post-thumbnail {
        flex-basis: auto;
        aspect-ratio: 16 / 9;
    }
}

/* Theme content card — single post + page wrapper. Provides a soft
   surface around the article so it stands out against the page hero
   gradient and sits comfortably next to the right sidebar. */
.st-content-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius-lg, 16px);
    padding: 36px;
    box-shadow: var(--st-shadow-sm, 0 1px 0 rgba(15, 23, 42, 0.04));
}
.st-content-card .entry-header {
    margin-bottom: 22px;
    padding: 0;
}
.st-content-card .entry-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin: 0 0 12px;
    color: var(--st-heading);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.st-content-card .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--st-muted);
    font-size: 13px;
    font-weight: 600;
}
.st-content-card .post-thumbnail {
    margin: 0 -36px 26px;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 21 / 9;
    background: var(--st-surface-alt);
}
.st-content-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.st-content-card .entry-content {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--st-text);
    padding: 0;
}
.st-content-card .entry-content > * + * {
    margin-top: 1.05em;
}
.st-content-card .entry-content h2 {
    font-size: 1.45rem;
    margin: 1.6em 0 0.6em;
    color: var(--st-heading);
}
.st-content-card .entry-content h3 {
    font-size: 1.2rem;
    margin: 1.4em 0 0.5em;
    color: var(--st-heading);
}
.st-content-card .entry-content a {
    color: var(--st-primary-hover);
    text-decoration: underline;
}
.st-content-card .entry-content blockquote {
    border-left: 4px solid var(--st-primary);
    background: var(--st-primary-soft);
    padding: 16px 20px;
    border-radius: 0 var(--st-radius-sm) var(--st-radius-sm) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--st-heading);
}
.st-content-card .entry-content code {
    background: var(--st-surface-alt);
    border: 1px solid var(--st-border-light);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.92em;
}
.st-content-card .entry-content pre {
    background: var(--st-dark-alt, #0f172a);
    color: #e2e8f0;
    border-radius: var(--st-radius-sm);
    padding: 18px;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 0.92em;
}
.st-content-card .entry-content img,
.st-content-card .entry-content figure {
    max-width: 100%;
    height: auto;
    border-radius: var(--st-radius-sm);
    margin: 1em auto;
}
.st-content-card .entry-footer {
    margin-top: 24px;
    padding: 18px 0 0;
    border-top: 1px solid var(--st-border-light);
    color: var(--st-muted);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.st-content-card:hover {
    transform: none;
    box-shadow: var(--st-shadow-sm, 0 1px 0 rgba(15, 23, 42, 0.04));
}
@media (max-width: 768px) {
    .st-content-card {
        padding: 22px;
        border-radius: 14px;
    }
    .st-content-card .post-thumbnail {
        margin: 0 -22px 18px;
    }
}

article.post,
article.page,
article.st-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: flex;
    flex-direction: column;
}

article.post:hover,
article.st-card:hover {
    transform: translateY(-2px);
    border-color: var(--st-border);
    box-shadow: var(--st-shadow-md);
}

article .post-thumbnail {
    display: block;
    overflow: hidden;
    background: var(--st-surface-alt);
    aspect-ratio: 16 / 9;
}

article .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

article:hover .post-thumbnail img {
    transform: scale(1.04);
}

article .entry-header {
    padding: 18px 18px 4px;
}

article .entry-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    line-height: 1.35;
}

article .entry-title a {
    color: var(--st-heading);
}
article .entry-title a:hover {
    color: var(--st-primary-hover);
}

article .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--st-muted);
    font-size: 12px;
    font-weight: 600;
}

article .entry-meta a {
    color: inherit;
}

article .entry-content,
article .entry-summary {
    padding: 4px 18px 0;
    color: var(--st-text);
}

article .entry-footer {
    padding: 12px 18px 18px;
    color: var(--st-muted);
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: auto;
}

/* Single article variations */
.single .site-main,
.page .site-main {
    padding-top: 24px;
}

.single article.post,
.page article.page {
    border-radius: var(--st-radius-lg);
    padding: 32px 36px 36px;
}

.single article.post .entry-header,
.page article.page .entry-header,
.single article.post .entry-content,
.page article.page .entry-content,
.single article.post .entry-footer,
.page article.page .entry-footer {
    padding: 0;
}

.single article.post .entry-title,
.page article.page .entry-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin: 12px 0;
}

.single article.post .post-thumbnail,
.page article.page .post-thumbnail {
    margin: 0 -36px 24px;
    aspect-ratio: 21 / 9;
}

.single article.post .entry-content,
.page article.page .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.single article.post .entry-content h2,
.page article.page .entry-content h2 {
    margin-top: 1.6em;
}

.single article.post .entry-content blockquote,
.page article.page .entry-content blockquote {
    border-left: 4px solid var(--st-primary);
    background: var(--st-primary-soft);
    padding: 16px 20px;
    border-radius: 0 var(--st-radius-sm) var(--st-radius-sm) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--st-heading);
}

.single article.post .entry-content code,
.page article.page .entry-content code {
    background: var(--st-surface-alt);
    border: 1px solid var(--st-border-light);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.92em;
}

.single article.post .entry-content pre,
.page article.page .entry-content pre {
    background: var(--st-dark-alt);
    color: #e2e8f0;
    border-radius: var(--st-radius-sm);
    padding: 18px;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 0.92em;
}

@media (max-width: 768px) {
    .single article.post,
    .page article.page {
        padding: 22px 18px 24px;
    }
    .single article.post .post-thumbnail,
    .page article.page .post-thumbnail {
        margin: 0 -18px 18px;
    }
}

/* Tags / categories chips */
.cat-links,
.tags-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cat-links a,
.tags-links a {
    background: var(--st-surface-alt);
    color: var(--st-text);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cat-links a:hover,
.tags-links a:hover {
    background: var(--st-primary-soft);
    color: var(--st-primary-hover);
}

/* =========================================================================
   Marketplace post card (template-parts/content.php + content-search.php).
   Defined AFTER the legacy article.post block so it wins specificity ties.
   ========================================================================= */
article.post-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border-light);
    border-radius: 18px;
    padding: 14px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
article.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    border-color: var(--st-border-light);
}

.post-card__media {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 10;
    background: var(--st-surface-alt);
    position: relative;
}
.post-card__media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
article.post-card:hover .post-card__media img {
    transform: scale(1.04);
}

.post-card__body {
    padding: 22px 8px 8px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    color: var(--st-primary, #16a34a);
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 14px;
    text-transform: none;
    letter-spacing: 0;
}
.post-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--st-primary, #16a34a);
}
.post-card__meta-item .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    color: var(--st-primary, #16a34a);
    flex-shrink: 0;
}
.post-card__meta-item a {
    color: inherit;
    text-decoration: none;
}
.post-card__meta-item a:hover {
    color: var(--st-primary-hover, #15803d);
    text-decoration: underline;
}

.post-card__title {
    font-size: clamp(20px, 1.9vw, 26px);
    font-weight: 800;
    line-height: 1.22;
    margin: 0 0 14px;
    color: var(--st-heading);
    letter-spacing: -0.01em;
}
.post-card__title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1.5px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: color 0.2s ease, background-size 0.25s ease;
}
.post-card__title a:hover {
    color: var(--st-primary-hover, #15803d);
    background-size: 100% 1.5px;
}

.post-card__excerpt {
    color: var(--st-text);
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 18px;
}
.post-card__excerpt p {
    margin: 0;
}
.post-card__excerpt p + p {
    margin-top: 0.6em;
}

.post-card__readmore {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--st-primary, #16a34a);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}
.post-card__readmore:hover {
    gap: 10px;
    color: var(--st-primary-hover, #15803d);
}
.post-card__readmore .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    transition: transform 0.2s ease;
}
.post-card__readmore:hover .dashicons {
    transform: translateX(2px);
}

/* List variant: thumbnail on the left when the sidebar is active. */
.st-post-grid--list article.post-card {
    flex-direction: row;
    gap: 14px;
    padding: 14px;
}
.st-post-grid--list .post-card__media {
    flex: 0 0 320px;
    aspect-ratio: 4 / 3;
}
.st-post-grid--list .post-card__body {
    padding: 12px 14px 12px 4px;
    flex: 1 1 0;
    min-width: 0;
}
@media (max-width: 1024px) {
    .st-post-grid--list .post-card__media { flex-basis: 240px; }
}
@media (max-width: 768px) {
    .st-post-grid--list article.post-card {
        flex-direction: column;
        gap: 0;
    }
    .st-post-grid--list .post-card__media {
        flex-basis: auto;
        aspect-ratio: 16 / 10;
    }
    .st-post-grid--list .post-card__body {
        padding: 22px 8px 8px;
    }
}

/* Pagination */
.posts-navigation,
.post-navigation,
.pagination,
.nav-links {
    margin-top: 32px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.nav-previous a,
.nav-next a {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 18px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    color: var(--st-text);
    background: var(--st-surface);
    transition: border-color 0.15s ease, color 0.15s ease;
    max-width: 320px;
}

.nav-previous a:hover,
.nav-next a:hover {
    border-color: var(--st-primary);
    color: var(--st-primary-hover);
}

.nav-subtitle {
    color: var(--st-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.nav-title { font-weight: 700; }

/* =========================================================================
   8. Comments
   ========================================================================= */
.comments-area {
    margin-top: 40px;
    padding: 28px;
    background: var(--st-surface);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius);
}

.comments-title {
    margin: 0 0 16px;
    font-size: 1.3rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment-body {
    padding: 16px 0;
    border-bottom: 1px solid var(--st-border-light);
}

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 24px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-form-comment textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    background: var(--st-surface);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--st-primary);
    box-shadow: 0 0 0 3px var(--st-primary-soft);
}

.comment-form .submit {
    background: linear-gradient(135deg, var(--st-primary), var(--st-primary-hover));
    color: #fff;
    border: 0;
    padding: 12px 22px;
    border-radius: var(--st-radius-sm);
    font-weight: 700;
    cursor: pointer;
}

/* =========================================================================
   9. Sidebar / widgets
   ========================================================================= */
/*
 * 2-column layout used by single posts, the blog index, archives and
 * search results. The wrapper is the .st-container itself so the
 * grid stays inside the site's max content width and aligns with the
 * header / footer. Templates only add `.st-with-sidebar` when the
 * Sidebar widget area is populated; otherwise the container falls back
 * to its default centred behaviour.
 */
.st-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 36px;
    align-items: start;
}

.st-main-col {
    min-width: 0;
}

@media (max-width: 1024px) {
    .st-with-sidebar {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.widget-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 96px;
}

@media (max-width: 1024px) {
    .widget-area {
        position: static;
        top: auto;
    }
}

.widget {
    background: var(--st-surface);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius);
    padding: 18px;
}

.widget-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--st-heading);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li + li {
    margin-top: 8px;
}

.widget li a {
    color: var(--st-text);
    font-weight: 600;
}

.widget li a:hover { color: var(--st-primary-hover); }

/* Spider Theme — tabbed posts widget (Recent / Most viewed / Trending) */
.widget-st-post-tabs .st-post-tabs {
    margin: 0;
}
.st-post-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
    padding: 4px;
    background: var(--st-surface-alt);
    border-radius: var(--st-radius-sm);
    border: 1px solid var(--st-border-light);
}
.st-post-tabs__tab {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: calc(var(--st-radius-sm) - 2px);
    background: transparent;
    color: var(--st-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    font-family: inherit;
    line-height: 1.2;
}
.st-post-tabs__tab:hover {
    color: var(--st-heading);
    background: color-mix(in srgb, var(--st-surface) 70%, transparent);
}
.st-post-tabs__tab.is-active,
.st-post-tabs__tab[aria-selected="true"] {
    background: var(--st-surface);
    color: var(--st-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.st-post-tabs__tab:focus-visible {
    outline: 2px solid var(--st-primary);
    outline-offset: 2px;
}
.st-post-tabs__panel[hidden] {
    display: none !important;
}
.st-post-tabs__panel.is-active:not([hidden]) {
    display: block;
}
.st-post-tabs__empty {
    margin: 0;
    font-size: 13px;
    color: var(--st-muted);
}
.st-post-tabs__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.st-post-tabs__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--st-border-light);
}
.st-post-tabs__item:first-child {
    padding-top: 2px;
}
.st-post-tabs__item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.st-post-tabs__thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--st-radius-sm);
    overflow: hidden;
    background: var(--st-surface-alt);
    border: 1px solid var(--st-border-light);
}
.st-post-tabs__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.st-post-tabs__body {
    min-width: 0;
    flex: 1;
}
.st-post-tabs__title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--st-heading);
    text-decoration: none;
    margin: 0 0 4px;
}
.st-post-tabs__title:hover {
    color: var(--st-primary-hover);
}
.st-post-tabs__excerpt {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--st-text);
    opacity: 0.92;
}
.st-post-tabs__date {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--st-muted);
    letter-spacing: 0.02em;
}

/* Search form (classic theme search-form + Gutenberg wp-block-search) */
.search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}
.search-form > label {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    display: flex;
}
.search-form .search-field {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    background: var(--st-surface);
    color: var(--st-heading);
    font-size: 14px;
}
.search-form .search-submit {
    flex: 0 0 auto;
    background: var(--st-primary);
    color: #fff;
    border: 0;
    padding: 0 18px;
    min-height: 42px;
    border-radius: var(--st-radius-sm);
    font-weight: 700;
    cursor: pointer;
}
.search-form .search-submit:hover {
    background: var(--st-primary-hover);
}

.wp-block-search {
    display: block;
    width: 100%;
    margin: 0;
}
.wp-block-search__input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    background: var(--st-surface);
    color: var(--st-heading);
    font-size: 14px;
}
.wp-block-search__button {
    flex: 0 0 auto;
    background: var(--st-primary);
    color: #fff;
    border: 0;
    padding: 0 18px;
    min-height: 42px;
    border-radius: var(--st-radius-sm);
    font-weight: 700;
    cursor: pointer;
}
.wp-block-search__button:hover {
    background: var(--st-primary-hover);
}

/* =========================================================================
   WordPress default widgets + core blocks (sidebar / footer / content)
   Aligns built-in widgets and Gutenberg blocks with the marketplace theme.
   ========================================================================= */

/* --- Generic widget rhythm ----------------------------------------------- */
.widget p { margin: 0 0 12px; line-height: 1.6; }
.widget p:last-child { margin-bottom: 0; }
.widget select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    background: var(--st-surface);
    color: var(--st-heading);
    font: inherit;
    font-size: 14px;
}
.widget input[type="text"],
.widget input[type="search"],
.widget input[type="email"],
.widget input[type="url"],
.widget textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    background: var(--st-surface);
    color: var(--st-heading);
    font: inherit;
    font-size: 14px;
}
.widget input:focus,
.widget textarea:focus,
.widget select:focus {
    outline: none;
    border-color: var(--st-primary);
    box-shadow: 0 0 0 3px var(--st-primary-soft);
}

/* --- List-style widgets (Pages / Categories / Archives / Meta / Nav) ----- */
.widget_pages li,
.widget_nav_menu li,
.widget_archive li,
.widget_categories li,
.widget_meta li,
.widget_recent_entries li,
.widget_rss li,
.widget_recent_comments li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--st-border-light);
    margin-top: 0;
}
.widget_pages li:last-child,
.widget_nav_menu li:last-child,
.widget_archive li:last-child,
.widget_categories li:last-child,
.widget_meta li:last-child,
.widget_recent_entries li:last-child,
.widget_rss li:last-child,
.widget_recent_comments li:last-child {
    border-bottom: 0;
}
.widget_pages li a,
.widget_nav_menu li a,
.widget_archive li a,
.widget_categories li a,
.widget_meta li a,
.widget_recent_entries li a,
.widget_recent_comments li a {
    flex: 1;
    color: var(--st-text);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}
.widget_pages li a:hover,
.widget_nav_menu li a:hover,
.widget_archive li a:hover,
.widget_categories li a:hover,
.widget_meta li a:hover,
.widget_recent_entries li a:hover,
.widget_recent_comments li a:hover {
    color: var(--st-primary-hover);
}
/* Counts — `(12)` in Categories / Archives */
.widget_archive li,
.widget_categories li {
    color: var(--st-muted);
    font-size: 13px;
}

/* Nested children (Pages / Nav menu / Categories) */
.widget_pages .children,
.widget_nav_menu .sub-menu,
.widget_categories .children {
    width: 100%;
    margin: 6px 0 0;
    padding-left: 14px;
    border-left: 2px solid var(--st-border-light);
}
.widget_pages .children li,
.widget_nav_menu .sub-menu li,
.widget_categories .children li {
    padding: 6px 0;
    border-bottom: 0;
    font-size: 13px;
}

/* Recent posts / RSS — date below title */
.widget_recent_entries li,
.widget_rss li {
    flex-direction: column;
    align-items: stretch;
}
.widget_recent_entries .post-date,
.widget_rss .rss-date {
    display: block;
    margin-top: 2px;
    color: var(--st-muted);
    font-size: 12px;
    font-weight: 600;
}
.widget_rss cite {
    display: block;
    margin-top: 4px;
    color: var(--st-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}
.widget_rss .rssSummary {
    margin-top: 6px;
    color: var(--st-text);
    font-size: 13px;
    line-height: 1.55;
}

/* Recent comments */
.widget_recent_comments .comment-author-link {
    color: var(--st-heading);
    font-weight: 700;
}

/* --- Tag Cloud ----------------------------------------------------------- */
.widget_tag_cloud .tagcloud,
.wp-block-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.widget_tag_cloud a,
.wp-block-tag-cloud a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--st-surface-alt);
    color: var(--st-text);
    border: 1px solid var(--st-border-light);
    border-radius: 999px;
    font-size: 12px !important;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.widget_tag_cloud a:hover,
.wp-block-tag-cloud a:hover {
    background: var(--st-primary-soft);
    color: var(--st-primary-hover);
    border-color: color-mix(in srgb, var(--st-primary) 30%, transparent);
}
.widget_tag_cloud a .tag-link-count,
.wp-block-tag-cloud a .tag-link-count {
    color: var(--st-muted);
    font-weight: 600;
}

/* --- Calendar (widget + block) ------------------------------------------ */
.widget_calendar table,
.wp-block-calendar table,
.calendar_wrap table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    font-size: 13px;
    color: var(--st-text);
}
.widget_calendar caption,
.wp-block-calendar caption,
.calendar_wrap caption {
    font-size: 13px;
    font-weight: 800;
    color: var(--st-heading);
    padding: 6px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.widget_calendar th,
.wp-block-calendar th,
.calendar_wrap th {
    background: var(--st-surface-alt);
    color: var(--st-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 0;
    border-radius: 4px;
}
.widget_calendar td,
.wp-block-calendar td,
.calendar_wrap td {
    text-align: center;
    padding: 8px 0;
    border-radius: 4px;
    background: var(--st-surface);
}
.widget_calendar tbody td a,
.wp-block-calendar tbody td a,
.calendar_wrap tbody td a {
    display: block;
    background: var(--st-primary-soft);
    color: var(--st-primary);
    font-weight: 700;
    border-radius: 4px;
    padding: 8px 0;
}
.widget_calendar tbody td a:hover,
.wp-block-calendar tbody td a:hover,
.calendar_wrap tbody td a:hover {
    background: var(--st-primary);
    color: #fff;
}
.widget_calendar nav,
.wp-block-calendar nav,
.calendar_wrap .wp-calendar-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
}
.widget_calendar nav a,
.wp-block-calendar nav a,
.calendar_wrap .wp-calendar-nav a {
    color: var(--st-primary);
    text-decoration: none;
}
.widget_calendar nav a:hover,
.wp-block-calendar nav a:hover,
.calendar_wrap .wp-calendar-nav a:hover {
    color: var(--st-primary-hover);
}

/* --- Block: Latest Posts ------------------------------------------------- */
.wp-block-latest-posts.wp-block-latest-posts__list,
.wp-block-latest-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wp-block-latest-posts > li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--st-border-light);
}
.wp-block-latest-posts > li:last-child {
    border-bottom: 0;
}
.wp-block-latest-posts__post-title {
    display: block;
    color: var(--st-heading);
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}
.wp-block-latest-posts__post-title:hover {
    color: var(--st-primary-hover);
}
.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--st-muted);
}
.wp-block-latest-posts__post-excerpt {
    margin-top: 6px;
    color: var(--st-text);
    font-size: 13px;
    line-height: 1.55;
}
.wp-block-latest-posts__featured-image img {
    border-radius: var(--st-radius-sm);
    margin-bottom: 8px;
    display: block;
}
.wp-block-latest-posts.is-grid {
    display: grid;
    gap: 14px;
}
.wp-block-latest-posts.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wp-block-latest-posts.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wp-block-latest-posts.is-grid > li { border-bottom: 0; padding: 0; }
@media (max-width: 600px) {
    .wp-block-latest-posts.is-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Block: Latest Comments --------------------------------------------- */
.wp-block-latest-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wp-block-latest-comments__comment {
    padding: 10px 0;
    border-bottom: 1px dashed var(--st-border-light);
    line-height: 1.5;
}
.wp-block-latest-comments__comment:last-child { border-bottom: 0; }
.wp-block-latest-comments__comment-meta {
    color: var(--st-text);
    font-size: 13px;
}
.wp-block-latest-comments__comment-meta a {
    color: var(--st-heading);
    font-weight: 700;
    text-decoration: none;
}
.wp-block-latest-comments__comment-meta a:hover { color: var(--st-primary-hover); }
.wp-block-latest-comments__comment-date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--st-muted);
    font-weight: 600;
}
.wp-block-latest-comments__comment-excerpt p {
    margin: 6px 0 0;
    color: var(--st-text);
    font-size: 13px;
}
.wp-block-latest-comments__comment-avatar {
    border-radius: 50%;
    margin-right: 8px;
}

/* --- Block: Archives / Categories / Page List --------------------------- */
.wp-block-archives,
.wp-block-categories,
.wp-block-page-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wp-block-archives li,
.wp-block-categories li,
.wp-block-page-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--st-border-light);
}
.wp-block-archives li:last-child,
.wp-block-categories li:last-child,
.wp-block-page-list li:last-child {
    border-bottom: 0;
}
.wp-block-archives li a,
.wp-block-categories li a,
.wp-block-page-list li a {
    flex: 1;
    color: var(--st-text);
    font-weight: 600;
    text-decoration: none;
}
.wp-block-archives li a:hover,
.wp-block-categories li a:hover,
.wp-block-page-list li a:hover {
    color: var(--st-primary-hover);
}
.wp-block-archives-dropdown select,
.wp-block-categories select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    background: var(--st-surface);
    color: var(--st-heading);
    font: inherit;
    font-size: 14px;
}
.wp-block-categories .children,
.wp-block-page-list .wp-block-page-list,
.wp-block-page-list ul {
    width: 100%;
    margin: 6px 0 0;
    padding-left: 14px;
    border-left: 2px solid var(--st-border-light);
    list-style: none;
}

/* --- Block: RSS --------------------------------------------------------- */
.wp-block-rss {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wp-block-rss__item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--st-border-light);
}
.wp-block-rss__item:last-child { border-bottom: 0; }
.wp-block-rss__item-title a {
    color: var(--st-heading);
    font-weight: 700;
    text-decoration: none;
}
.wp-block-rss__item-title a:hover { color: var(--st-primary-hover); }
.wp-block-rss__item-publish-date,
.wp-block-rss__item-author {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--st-muted);
    font-weight: 600;
}
.wp-block-rss__item-excerpt {
    margin-top: 6px;
    color: var(--st-text);
    font-size: 13px;
    line-height: 1.55;
}

/* --- Block: Search ------------------------------------------------------ */
.wp-block-search .wp-block-search__label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--st-heading);
}
.wp-block-search__inside-wrapper {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: stretch;
}
.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper {
    padding: 4px;
    gap: 0;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper:focus-within {
    border-color: var(--st-primary);
    box-shadow: 0 0 0 3px var(--st-primary-soft);
}
.wp-block-search.wp-block-search__button-inside .wp-block-search__input {
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 36px;
    padding: 0 12px;
}
.wp-block-search.wp-block-search__button-inside .wp-block-search__input:focus {
    outline: none;
    box-shadow: none;
}
.wp-block-search.wp-block-search__button-inside .wp-block-search__button {
    margin: 0;
    padding: 0 16px;
    min-height: 36px;
}
.wp-block-search.wp-block-search__no-button .wp-block-search__inside-wrapper {
    gap: 0;
}
.wp-block-search__button.has-icon {
    padding: 0 14px;
}
.wp-block-search__button svg { fill: currentColor; }

/* --- Block: Social Links ------------------------------------------------ */
.wp-block-social-links {
    gap: 8px;
}
.wp-block-social-links .wp-social-link {
    background: var(--st-surface-alt);
    border: 1px solid var(--st-border-light);
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.wp-block-social-links .wp-social-link:hover {
    transform: translateY(-1px);
    background: var(--st-primary);
    color: #fff;
    border-color: var(--st-primary);
}
.wp-block-social-links .wp-social-link a { color: inherit; }

/* --- Block: Buttons ----------------------------------------------------- */
.wp-block-buttons { gap: 10px; }
.wp-block-button__link {
    background: var(--st-primary);
    color: #fff;
    border: 0;
    padding: 12px 22px;
    border-radius: var(--st-radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.wp-block-button__link:hover {
    background: var(--st-primary-hover);
    color: #fff;
    transform: translateY(-1px);
}
.wp-block-button.is-style-outline .wp-block-button__link,
.is-style-outline > .wp-block-button__link {
    background: transparent;
    color: var(--st-primary);
    border: 2px solid var(--st-primary);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--st-primary);
    color: #fff;
}

/* --- Block: Quote / Pullquote / Code / Preformatted / Verse ------------- */
.wp-block-quote,
blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    background: var(--st-primary-soft);
    border-left: 4px solid var(--st-primary);
    border-radius: 0 var(--st-radius-sm) var(--st-radius-sm) 0;
    color: var(--st-heading);
    font-style: italic;
}
.wp-block-quote cite,
blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--st-muted);
    font-style: normal;
    font-weight: 700;
}
.wp-block-pullquote {
    margin: 32px 0;
    padding: 24px;
    border-top: 3px solid var(--st-primary);
    border-bottom: 3px solid var(--st-primary);
    text-align: center;
    color: var(--st-heading);
    font-size: 1.15rem;
    font-weight: 600;
}
.wp-block-pullquote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--st-muted);
    font-style: normal;
}
.wp-block-code,
pre.wp-block-preformatted,
.wp-block-verse {
    background: var(--st-dark-alt, #0f172a);
    color: #e2e8f0;
    border-radius: var(--st-radius-sm);
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 0.92em;
    line-height: 1.6;
    margin: 18px 0;
}
.wp-block-code code { color: inherit; background: transparent; padding: 0; }

/* --- Block: List -------------------------------------------------------- */
.entry-content > ul,
.entry-content > ol,
.wp-block-list {
    margin: 0 0 18px;
    padding-left: 22px;
    line-height: 1.7;
}
.wp-block-list li + li { margin-top: 4px; }

/* --- Block: Table ------------------------------------------------------- */
.wp-block-table table,
.entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius-sm);
    overflow: hidden;
    font-size: 14px;
    margin: 18px 0;
}
.wp-block-table th,
.entry-content table th {
    background: var(--st-surface-alt);
    color: var(--st-heading);
    font-weight: 800;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--st-border-light);
}
.wp-block-table td,
.entry-content table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--st-border-light);
    color: var(--st-text);
}
.wp-block-table tr:last-child td,
.entry-content table tr:last-child td {
    border-bottom: 0;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td {
    background: var(--st-surface-alt);
}

/* --- Block: Separator / Spacer ----------------------------------------- */
.wp-block-separator {
    border: 0;
    height: 1px;
    background: var(--st-border-light);
    margin: 28px auto;
    max-width: 100%;
}
.wp-block-separator.is-style-wide { max-width: 100%; }
.wp-block-separator.is-style-dots {
    background: transparent;
    text-align: center;
    line-height: 1;
}
.wp-block-separator.is-style-dots::before {
    content: "···";
    color: var(--st-muted);
    letter-spacing: 1em;
    font-size: 22px;
}

/* --- Block: Image / Gallery / Cover ------------------------------------ */
.wp-block-image figure,
.wp-block-image {
    margin: 18px 0;
}
.wp-block-image img {
    border-radius: var(--st-radius-sm);
    height: auto;
    max-width: 100%;
}
.wp-block-image figcaption,
figcaption {
    text-align: center;
    color: var(--st-muted);
    font-size: 12px;
    margin-top: 8px;
}
.wp-block-gallery .blocks-gallery-item img,
.wp-block-gallery img {
    border-radius: var(--st-radius-sm);
}
.wp-block-cover {
    border-radius: var(--st-radius);
    overflow: hidden;
}

/* --- Block: Embed / Video / Audio / File ------------------------------- */
.wp-block-embed iframe,
.wp-block-video video,
.wp-block-audio audio {
    width: 100%;
    border-radius: var(--st-radius-sm);
}
.wp-block-file {
    background: var(--st-surface-alt);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wp-block-file a:first-child {
    color: var(--st-heading);
    font-weight: 700;
    text-decoration: none;
}
.wp-block-file__button {
    background: var(--st-primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--st-radius-sm);
    font-weight: 700;
    text-decoration: none;
}
.wp-block-file__button:hover { background: var(--st-primary-hover); color: #fff; }

/* --- Block: Group / Columns / Heading / Paragraph ---------------------- */
.wp-block-group { margin: 0 0 18px; }
.wp-block-columns { gap: 24px; margin: 0 0 18px; }
.wp-block-heading,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--st-heading);
    line-height: 1.3;
    margin: 1.4em 0 0.6em;
    font-weight: 800;
}

/* --- Footer widget area: lighten label + link colors ------------------- */
.site-footer .widget select,
.site-footer .widget input[type="text"],
.site-footer .widget input[type="search"],
.site-footer .widget input[type="email"],
.site-footer .widget input[type="url"],
.site-footer .widget textarea {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}
.site-footer .widget input::placeholder,
.site-footer .widget textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}
.site-footer .widget_pages li,
.site-footer .widget_nav_menu li,
.site-footer .widget_archive li,
.site-footer .widget_categories li,
.site-footer .widget_meta li,
.site-footer .widget_recent_entries li,
.site-footer .widget_rss li,
.site-footer .widget_recent_comments li,
.site-footer .wp-block-archives li,
.site-footer .wp-block-categories li,
.site-footer .wp-block-page-list li,
.site-footer .wp-block-latest-posts > li,
.site-footer .wp-block-latest-comments__comment,
.site-footer .wp-block-rss__item {
    border-color: rgba(255, 255, 255, 0.08);
}
.site-footer .widget li a,
.site-footer .wp-block-archives li a,
.site-footer .wp-block-categories li a,
.site-footer .wp-block-page-list li a,
.site-footer .wp-block-latest-posts__post-title,
.site-footer .wp-block-rss__item-title a,
.site-footer .wp-block-latest-comments__comment-meta a {
    color: rgba(255, 255, 255, 0.85);
}
.site-footer .widget li a:hover,
.site-footer .wp-block-archives li a:hover,
.site-footer .wp-block-categories li a:hover,
.site-footer .wp-block-page-list li a:hover,
.site-footer .wp-block-latest-posts__post-title:hover,
.site-footer .wp-block-rss__item-title a:hover,
.site-footer .wp-block-latest-comments__comment-meta a:hover {
    color: #fff;
}
.site-footer .widget_calendar table,
.site-footer .wp-block-calendar table,
.site-footer .calendar_wrap table {
    color: rgba(255, 255, 255, 0.85);
}
.site-footer .widget_calendar th,
.site-footer .wp-block-calendar th,
.site-footer .calendar_wrap th {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}
.site-footer .widget_calendar td,
.site-footer .wp-block-calendar td,
.site-footer .calendar_wrap td {
    background: rgba(255, 255, 255, 0.04);
}
.site-footer .widget_tag_cloud a,
.site-footer .wp-block-tag-cloud a {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
}
.site-footer .widget_tag_cloud a:hover,
.site-footer .wp-block-tag-cloud a:hover {
    background: var(--st-primary);
    color: #fff;
    border-color: var(--st-primary);
}
.site-footer .wp-block-quote,
.site-footer blockquote {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--st-primary);
    color: rgba(255, 255, 255, 0.92);
}

/* =========================================================================
   10. 404 page
   ========================================================================= */
.error-404.st-error {
    padding: 80px 0 100px;
    text-align: center;
}

.error-404 .st-error__code {
    font-size: clamp(7rem, 18vw, 14rem);
    font-weight: 900;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--st-primary), var(--st-primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-404 .st-error__title {
    margin: 8px 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.error-404 .st-error__text {
    color: var(--st-muted);
    max-width: 560px;
    margin: 0 auto 28px;
    font-size: 1.05rem;
}

.error-404 .st-error__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}

.error-404 .st-error__search {
    max-width: 480px;
    margin: 0 auto 32px;
}

.error-404 .st-error__suggestions {
    max-width: 720px;
    margin: 0 auto;
    background: var(--st-surface);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius);
    padding: 22px 24px;
    text-align: left;
}

.error-404 .st-error__suggestions h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
    color: var(--st-muted);
}

.error-404 .st-error__suggestions ul {
    columns: 2;
    column-gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 600px) {
    .error-404 .st-error__suggestions ul { columns: 1; }
}

.error-404 .st-error__suggestions li {
    break-inside: avoid;
    margin-bottom: 6px;
}

.error-404 .st-error__suggestions li a {
    display: flex;
    justify-content: space-between;
    color: var(--st-text);
    font-weight: 600;
    padding: 6px 0;
}

.error-404 .st-error__suggestions li a span {
    color: var(--st-muted);
    font-weight: 700;
}

.error-404 .st-error__suggestions li a:hover {
    color: var(--st-primary-hover);
}

/* =========================================================================
   11. Footer
   ========================================================================= */
.site-footer {
    margin-top: 60px;
    background: var(--st-dark);
    color: var(--st-on-dark);
}

.site-footer a {
    color: var(--st-on-dark);
}
.site-footer a:hover {
    color: #fff;
}

.site-footer__widgets {
    display: grid;
    gap: 40px;
    padding: 64px 0 40px;
}
.site-footer__widgets--cols-1 { grid-template-columns: minmax(0, 1fr); }
.site-footer__widgets--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer__widgets--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.site-footer__widgets--cols-4 { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
.site-footer__widgets--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.site-footer__widgets--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.site-footer__widgets--placeholder { display: block; }
.site-footer__before {
    padding: 40px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
}
.site-footer__before .widget + .widget {
    margin-top: 24px;
}
.site-footer__placeholder {
    margin: 0;
    padding: 32px 0;
    color: rgba(229, 231, 235, 0.7);
    font-size: 14px;
}
.site-footer__placeholder a { color: #fff; text-decoration: underline; }

.site-footer__brand p {
    margin: 14px 0 18px;
    color: rgba(229, 231, 235, 0.78);
    max-width: 360px;
}

.site-footer__title {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
}

.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
}

.site-footer .widget-title {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.site-footer .widget li {
    border: 0;
}

.site-footer .widget li a {
    color: rgba(229, 231, 235, 0.78);
    font-weight: 500;
}

.site-footer .widget li a:hover {
    color: #fff;
}

.site-footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__menu li + li { margin-top: 10px; }

.site-footer__menu a {
    color: rgba(229, 231, 235, 0.78);
    font-weight: 500;
}

.site-footer__menu a:hover { color: #fff; }

.site-footer__newsletter input[type="email"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: var(--st-radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 10px;
}

.site-footer__newsletter input[type="email"]::placeholder {
    color: rgba(229, 231, 235, 0.55);
}

.site-footer__newsletter button {
    width: 100%;
    background: var(--st-primary);
    color: #fff;
    border: 0;
    padding: 12px 18px;
    border-radius: var(--st-radius-sm);
    font-weight: 700;
    cursor: pointer;
}

.site-footer__newsletter button:hover {
    background: var(--st-primary-hover);
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 0;
}

.site-footer__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: rgba(229, 231, 235, 0.65);
    font-size: 13px;
}

.site-footer__bottom-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.site-footer__payments {
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-footer__payment-image {
    display: block;
    max-width: min(100%, 320px);
    height: auto;
}

/* =========================================================================
   Footer widgets (Spider Theme About / Page List / Newsletter)
   ========================================================================= */
.st-about {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    max-width: 360px;
}
.st-about__logo-wrap {
    display: inline-block;
    margin-bottom: 4px;
}
.st-about__logo {
    max-width: 180px;
    height: auto;
    display: block;
}
.st-about__before,
.st-about__after,
.st-about__content {
    margin: 0;
    color: rgba(229, 231, 235, 0.78);
    font-size: 14px;
    line-height: 1.55;
}
.st-about__before { font-weight: 600; color: rgba(255, 255, 255, 0.92); }
.st-about__after  { font-size: 13px; color: rgba(229, 231, 235, 0.6); }
.st-about__btn {
    align-self: flex-start;
    margin-top: 4px;
}
.st-about__payments {
    margin-top: 4px;
}
.st-about__payment-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.st-about__socials {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.st-about__socials a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(229, 231, 235, 0.92);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.st-about__socials a:hover {
    background: var(--st-primary);
    border-color: var(--st-primary);
    color: #fff;
}
.st-about__socials .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.st-pagelist__items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.st-pagelist__items li + li { margin-top: 10px; }
.st-pagelist__items a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(229, 231, 235, 0.78);
    font-weight: 500;
}
.st-pagelist__items a:hover { color: #fff; }
.st-pagelist__items .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: rgba(229, 231, 235, 0.55);
}
.st-pagelist__items a:hover .dashicons { color: #fff; }
.st-pagelist__before,
.st-pagelist__after {
    margin: 0 0 12px;
    color: rgba(229, 231, 235, 0.6);
    font-size: 13px;
    line-height: 1.55;
}
.st-pagelist__after { margin: 12px 0 0; }

.st-newsletter__before,
.st-newsletter__after {
    margin: 0 0 12px;
    color: rgba(229, 231, 235, 0.7);
    font-size: 13px;
    line-height: 1.55;
}
.st-newsletter__after { margin: 12px 0 0; }
.st-newsletter__form,
.site-footer__newsletter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.st-newsletter__shortcode > * { color: inherit; }

/* Inherit Customizer footer colors when set. */
.site-footer { background: var(--st-footer-bg, var(--st-heading)); }

@media (max-width: 1024px) {
    .site-footer__widgets--cols-3,
    .site-footer__widgets--cols-4,
    .site-footer__widgets--cols-5,
    .site-footer__widgets--cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .site-footer__widgets--cols-1,
    .site-footer__widgets--cols-2,
    .site-footer__widgets--cols-3,
    .site-footer__widgets--cols-4,
    .site-footer__widgets--cols-5,
    .site-footer__widgets--cols-6 {
        grid-template-columns: 1fr;
        padding: 44px 0 24px;
    }

    .site-footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer__payments {
        justify-content: flex-start;
        width: 100%;
    }
}

/* =========================================================================
   11.b Comments — full styling pass
   ========================================================================= */
.comments-area .comments-title {
    color: var(--st-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0 24px;
}
.comment-list .comment,
.comment-list .pingback,
.comment-list .trackback {
    list-style: none;
    margin: 0;
}
.comment-list .comment-body {
    position: relative;
    background: var(--st-surface-alt);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius);
    padding: 18px 18px 14px 64px;
    min-height: 64px;
}
.comment-list .comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.comment-list .comment-author .avatar {
    position: absolute;
    top: 18px;
    left: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--st-border-light);
}
.comment-list .comment-author .fn {
    color: var(--st-heading);
    font-weight: 800;
    font-size: 14px;
    font-style: normal;
}
.comment-list .comment-author .says { display: none; }
.comment-list .comment-metadata {
    color: var(--st-muted);
    font-size: 12px;
    margin: 0 0 8px;
}
.comment-list .comment-metadata a { color: inherit; text-decoration: none; }
.comment-list .comment-metadata a:hover { color: var(--st-primary-hover); }
.comment-list .comment-content {
    color: var(--st-text);
    font-size: 14.5px;
    line-height: 1.65;
}
.comment-list .comment-content p { margin: 0 0 8px; }
.comment-list .comment-content p:last-child { margin-bottom: 0; }
.comment-list .reply {
    margin-top: 8px;
}
.comment-list .reply a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--st-primary-soft);
    color: var(--st-primary);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.comment-list .reply a:hover {
    background: var(--st-primary);
    color: #fff;
}
.comment-list .children {
    margin: 12px 0 0 28px;
    padding-left: 16px;
    border-left: 2px solid var(--st-border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comment-list .bypostauthor > .comment-body {
    border-color: color-mix(in srgb, var(--st-primary) 30%, transparent);
    background: var(--st-primary-soft);
}
.comment-list .bypostauthor > .comment-body::before {
    content: attr(data-author-badge, "Author");
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--st-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
}

.comment-respond { margin-top: 20px; }
.comment-reply-title {
    color: var(--st-heading);
    font-size: 1.1rem;
    font-weight: 800;
}
.comment-reply-title small { font-weight: 600; font-size: 13px; }
.comment-form { display: grid; gap: 12px; }
.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 13px;
    color: var(--st-heading);
}
.comment-form .required { color: var(--st-primary); margin-left: 2px; }
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--st-muted);
    font-size: 13px;
}
.comment-form-cookies-consent input[type="checkbox"] { margin-top: 4px; }
.comment-form .form-submit {
    margin: 0;
}
.comment-form .submit:hover {
    transform: translateY(-1px);
}
.comment-notes,
.logged-in-as {
    color: var(--st-muted);
    font-size: 13px;
}
.no-comments {
    color: var(--st-muted);
    font-style: italic;
}

@media (max-width: 600px) {
    .comment-list .comment-body {
        padding: 56px 16px 14px;
    }
    .comment-list .comment-author .avatar {
        top: 14px;
        left: 14px;
        width: 36px;
        height: 36px;
    }
    .comment-list .children {
        margin-left: 14px;
        padding-left: 10px;
    }
}

/* =========================================================================
   11.c Wide / full alignment inside the article card
   When a sidebar is present the main column is narrow; alignwide / alignfull
   should "pop" out of the card (negative margin) instead of being clipped.
   ========================================================================= */
.st-content-card .alignwide,
.st-content-card > .alignwide,
.st-content-card .entry-content > .alignwide {
    width: auto;
    max-width: none;
    margin-left: -36px;
    margin-right: -36px;
}
.st-content-card .alignfull,
.st-content-card > .alignfull,
.st-content-card .entry-content > .alignfull {
    width: calc(100% + 72px);
    max-width: none;
    margin-left: -36px;
    margin-right: -36px;
    border-radius: 0;
}
@media (max-width: 768px) {
    .st-content-card .alignwide,
    .st-content-card > .alignwide,
    .st-content-card .entry-content > .alignwide,
    .st-content-card .alignfull,
    .st-content-card > .alignfull,
    .st-content-card .entry-content > .alignfull {
        margin-left: -22px;
        margin-right: -22px;
        width: calc(100% + 44px);
    }
}

/* =========================================================================
   12. Page-links / utilities
   ========================================================================= */
.page-links {
    margin: 18px 0;
    font-weight: 700;
    color: var(--st-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-links a,
.page-links > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--st-border);
    background: var(--st-surface);
}

.page-links > span {
    background: var(--st-primary);
    color: #fff;
    border-color: var(--st-primary);
}

/* WP alignment */
.alignleft  { float: left; margin: 0 1.2em 1.2em 0; }
.alignright { float: right; margin: 0 0 1.2em 1.2em; }
.aligncenter{ display: block; margin-left: auto; margin-right: auto; }
.alignwide  { max-width: 1100px; margin: 1.2em auto; }
.alignfull  { width: 100%; margin: 1.2em 0; }

.wp-caption-text,
.gallery-caption {
    font-size: 12px;
    color: var(--st-muted);
    text-align: center;
    margin-top: 6px;
}
/* ── Archive: filter badge + clear button (H-001) ───────────────────────── */
.stc-filter-toggle { position: relative; }
.stc-filter-toggle__badge {
    position: absolute;
    top: -6px; right: -6px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    background: var(--st-primary, #6c47ff);
    color: #fff;
    font-size: 11px; font-weight: 600; line-height: 18px;
    border-radius: 9px;
    text-align: center;
    pointer-events: none;
}
.stc-filter-clear {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; color: var(--st-muted, #666);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.stc-filter-clear:hover { color: var(--st-danger, #DC2626); background: rgba(220,38,38,.06); }
.stc-filter-clear .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* ── Archive: loading state (H-008) ─────────────────────────────────────── */
.stc-catalog-layout--loading { pointer-events: none; }
.stc-catalog-layout--loading .stc-catalog-items { opacity: .4; transition: opacity .2s; }

/* ── CSS variable: danger token (M-001) ─────────────────────────────────── */
:root {
    --st-danger: #DC2626;
}

/* ── Comment indent overflow on mobile (L-006) ───────────────────────────── */
@media (max-width: 640px) {
    .stc-comment-list .children { margin-left: clamp(8px, 4vw, 32px); }
    .stc-comment-list .children .children { margin-left: 0; }
}

.site-main--landing article.st-landing-article {
    background: transparent;
    border: none;
    padding: 0;
}