/*!
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.2
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
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 — Spider Themes (spider-themes.net) */
    /* Derive from plugin token so admin color picker stays in sync */
    --brand-color: #5966fb;
    --brand-color-hover: #4a54e0;
    --brand-color-light: #6a6aff;
    --brand-color-soft: color-mix(in srgb, var(--brand-color) 12%, transparent);

    /* Surfaces */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-alt-color: #f9fafb;
    --dark-color: #111827;

    /* Text — Spider Themes (heading navy, slate body) */
    --heading-color: #1d2746;
    --text-color: #425466;
    --muted-color: #64748b;
    --text-on-dark-color: #e5e7eb;

    /* Border */
    --border-color: #e5e7eb;
    --border-light-color: #f1f5f9;

    /* Layout — kept in sync with the plugin's --container-width (1480px)
       so the header/footer line up with the marketplace content box. */
    --container-width: 1480px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12);

    /* Type — Roboto is the only supported theme typeface (body + headings). */
    --roboto-font: "Roboto", sans-serif;

    /* Type — scale */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.8125rem;
    /* 13px */
    --text-base: 0.9375rem;
    /* 15px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.75rem;
    /* 28px */
    --text-3xl: 2.5rem;
    /* 40px */

    /* Type — weight */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    /* Type — line-height */
    --leading-tight: 1.18;
    --leading-snug: 1.35;
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;

    /* Spacing scale (4px base) */
    --space-1: 0.25rem;
    /*  4px */
    --space-2: 0.5rem;
    /*  8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */

    /* Status colors */
    --success-color: #22c55e;
    --success-color-soft: rgba(34, 197, 94, 0.12);
    --warning-color: #f59e0b;
    --warning-color-soft: rgba(245, 158, 11, 0.12);
    --error-color: #ef4444;
    --error-color-soft: rgba(239, 68, 68, 0.12);
    --info-color: #3b82f6;
    --info-color-soft: rgba(59, 130, 246, 0.12);

    /* Z-index scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* (merged into the main :root block above — no override needed here) */

/* =========================================================================
   2. Reset / base
   ========================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--roboto-font);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:where(:not(.wp-element-button)) {
    text-decoration: none !important;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--roboto-font);
    color: var(--heading-color);
    line-height: 1.3;
    margin: 0 0 0.6em;
    font-weight: var(--fw-bold);
    /* 700 — matches spider-themes.net */
    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(--brand-color);
    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(--surface-color);
    color: var(--heading-color);
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: var(--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(--container-width);
    margin: 0 auto;
    padding: 0 16px;
}

.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(--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(--brand-color), var(--brand-color-hover));
    color: #fff;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-color) 25%, transparent);
}

.st-btn--primary:hover,
.st-btn--primary:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--brand-color) 32%, transparent);
}

.st-btn--ghost {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--heading-color);
}

.st-btn--ghost:hover {
    border-color: var(--brand-color);
    color: var(--brand-color-hover);
}

.st-btn--dark {
    background: var(--dark-color);
    color: #fff;
}

.st-btn--dark:hover {
    background: var(--dark-color);
    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(--border-light-color);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
    border-bottom-color: transparent;
    box-shadow: var(--shadow-sm);
}

/* Home hero: header has no background of its own - it floats over the hero
   gradient so there's no visible seam between nav and hero. Becomes the
   normal solid bar the instant the page scrolls past the hero (is-scrolled
   is already toggled by header.js on scroll). */
.page-template-stc-home-template-php .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.page-template-stc-home-template-php .site-header.is-scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    border-bottom-color: var(--border-light-color);
}

.site-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 80px;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ---- Mobile menu toggle (animated hamburger) ---- */
.site-header__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-light-color);
    background: var(--surface-color);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.site-header__menu-toggle:hover {
    background: var(--surface-alt-color);
    border-color: var(--border-color);
}

.site-header__menu-toggle-bars {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 13px;
}

.site-header__menu-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--heading-color);
    transition: transform 0.22s ease, opacity 0.22s ease, top 0.22s ease;
}

.site-header__menu-toggle-bars span:nth-child(1) {
    top: 0;
}

.site-header__menu-toggle-bars span:nth-child(2) {
    top: 5.5px;
}

.site-header__menu-toggle-bars span:nth-child(3) {
    top: 11px;
}

.site-header__menu-toggle.is-active .site-header__menu-toggle-bars span:nth-child(1) {
    top: 5.5px;
    transform: rotate(45deg);
}

.site-header__menu-toggle.is-active .site-header__menu-toggle-bars span:nth-child(2) {
    opacity: 0;
}

.site-header__menu-toggle.is-active .site-header__menu-toggle-bars span:nth-child(3) {
    top: 5.5px;
    transform: rotate(-45deg);
}

/* ---- 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__logo:hover .site-branding__mark {
    transform: scale(1.06) rotate(-4deg);
}

.site-branding__mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand-color), var(--brand-color-hover));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    letter-spacing: -0.02em;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-color) 25%, transparent);
}

.site-branding__text {
    font-size: 20px;
    font-weight: 700;
    color: var(--heading-color);
    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: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--heading-color);
}

.site-title a:hover {
    color: var(--brand-color-hover);
}

.site-description {
    margin: 0;
    font-size: 12px;
    color: var(--muted-color);
}

/* ---- Primary nav ---- */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
    order: 2;
}

/* ---- Menu position (Spider Theme -> Settings -> Appearance -> Header ->
   Menu position). Desktop only — the mobile drawer ignores this entirely. ---- */
@media (min-width: 1025px) {

    /* Center: float the nav in the exact middle of the header, independent
       of how wide the logo or the actions cluster are on either side. */
    .site-header__inner--nav-center .main-navigation {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    /* Right: group the nav with the actions cluster on the far right,
       leaving the logo alone on the far left. */
    .site-header__inner--nav-right .main-navigation {
        order: 3;
        margin-left: auto;
    }

    .site-header__inner--nav-right .site-header__actions {
        order: 4;
        margin-left: 0;
    }
}

.main-navigation__head {
    display: none;
}

/* Desktop: My Account lives in the actions cluster (after search, far right)
   instead of trailing the nav menu — mobile-only version below. */
.main-navigation__footer {
    display: none;
}

.main-navigation__head-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.main-navigation__head-logo {
    max-height: 32px;
    width: auto;
    display: block;
}

.main-navigation__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light-color);
    background: var(--surface-color);
    border-radius: 8px;
    color: var(--heading-color);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.main-navigation__close:hover {
    background: var(--surface-alt-color);
    color: var(--brand-color-hover);
}

.main-navigation__close .stc-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.main-navigation a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a,
.main-navigation .current-menu-ancestor>a {
    color: var(--brand-color);
}

.main-navigation .menu-item-has-children>a::after {
    content: "\33";
    font-family: "ElegantIcons";
    font-weight: normal;
    font-size: 11px;
    line-height: 1;
    margin-left: 2px;
    color: var(--muted-color);
    position: static;
    background: none;
    transform: none;
    display: inline-block;
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    padding: 10px;
    background: var(--surface-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.16s ease, visibility 0.16s, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: var(--z-dropdown);
}

/* Small pointer that visually ties the dropdown back to its parent link. */
.main-navigation>.menu>li.menu-item-has-children>.sub-menu::before,
.main-navigation>div>ul>li.menu-item-has-children>.sub-menu::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 22px;
    width: 10px;
    height: 10px;
    background: var(--surface-color);
    border: 1px solid var(--border-light-color);
    border-right: 0;
    border-bottom: 0;
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
}

.main-navigation li.menu-item-has-children {
    position: relative;
}

/* Bridges the visual gap between a nav link and its dropdown so hover
   doesn't drop (and the menu flicker open/closed) while the pointer
   crosses it. The negative margin cancels the extra height so nothing
   shifts. Desktop-only — mobile uses a static accordion, no hover gap. */
@media (min-width: 1025px) {
    .main-navigation li.menu-item-has-children {
        padding-bottom: 14px;
        margin-bottom: -14px;
    }
}

.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;
    transform: translateY(0) scale(1);
}

.main-navigation .sub-menu a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.main-navigation .sub-menu a:hover {
    background: var(--brand-color-soft);
    color: var(--brand-color);
}

.main-navigation .sub-menu .current-menu-item>a {
    background: var(--brand-color-soft);
    color: var(--brand-color);
}

/* ---- Rich dropdown rows (menu item image + description) ---- */
.main-navigation .sub-menu:has(.menu-item-media) {
    min-width: 320px;
}

.main-navigation .sub-menu .menu-item-media {
    flex-shrink: 0;
}

.main-navigation .sub-menu .menu-item-media img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.main-navigation .sub-menu .menu-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.main-navigation .sub-menu a:has(.menu-item-text) {
    gap: 12px;
    white-space: normal;
}

.main-navigation .sub-menu .menu-item-desc {
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--muted-color);
}

.main-navigation .sub-menu .menu-item-has-children>a::after {
    content: "\35";
    margin-left: auto;
    font-size: 10px;
}

/* Nested (3rd-level+) dropdowns fly out to the side instead of stacking
   below their parent inside an already-open panel. */
.main-navigation .sub-menu .sub-menu {
    top: -10px;
    left: 100%;
    margin-top: 0;
    transform: translateX(6px) scale(0.98);
    transform-origin: top left;
}

/* Same hover-bridge trick, but sideways — the flyout opens to the right
   with a horizontal gap, so bridge that instead of the (unused) bottom one. */
@media (min-width: 1025px) {
    .main-navigation .sub-menu li.menu-item-has-children {
        padding-bottom: 0;
        margin-bottom: 0;
        padding-right: 10px;
        margin-right: -10px;
    }
}

.main-navigation .sub-menu li.menu-item-has-children:hover>.sub-menu,
.main-navigation .sub-menu li.menu-item-has-children:focus-within>.sub-menu {
    transform: translateX(0) scale(1);
}

.main-navigation .sub-menu .sub-menu::before {
    display: none;
}

/* JS-injected accordion chevrons are mobile-only; hide everywhere by default. */
.main-navigation .menu-item-toggle {
    display: none;
}

/* ---- Actions cluster (search + mobile menu toggle), pinned to the far
   right with the empty flexible space (margin-left: auto) keeping it
   apart from the nav/logo on the left. ---- */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    order: 3;
    margin-left: auto;
}

/* ---- Search toggle (icon-only trigger in the header bar) ---- */
.site-header__search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    border-radius: 999px;
    color: var(--heading-color);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.site-header__search-toggle:hover,
.site-header__search-toggle.is-active {
    background: var(--surface-alt-color);
    color: var(--brand-color-hover);
}

.site-header__search-toggle .stc-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ---- Search — shared base (input/placeholder look, both variants) ---- */
.site-header__search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    color: var(--heading-color);
    height: 100%;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

.site-header__search input[type="search"]::placeholder {
    color: var(--muted-color);
}

.site-header__search input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

/* ---- Variant: overlay — input centered on screen; results expand downward
   from that point (top anchored at 50vh minus half the bar height). ---- */
.site-header__search--overlay {
    --st-search-bar-height: 60px;
    --st-search-bar-half: 30px;
    position: fixed;
    top: calc(50vh - var(--st-search-bar-half));
    left: 50%;
    z-index: 96;
    display: flex;
    flex-direction: column;
    width: min(600px, 92vw);
    max-height: calc(50vh + var(--st-search-bar-half) - 24px);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s, transform 0.2s ease;
}

.site-header__search--overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.site-header__search--overlay .site-header__search-bar {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: var(--st-search-bar-height);
    padding: 0 56px 0 22px;
}

.site-header__search--overlay .stc-icon.icon_search {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-color);
    font-size: 17px;
    width: 17px;
    height: 17px;
    pointer-events: none;
}

.site-header__search--overlay input[type="search"] {
    flex: 1;
    min-width: 0;
    padding-left: 36px;
    font-size: 16px;
    height: var(--st-search-bar-height);
}

.site-header__search--overlay .stc-ajax-search__results {
    position: static;
    flex: 1 1 auto;
    width: 100%;
    max-height: min(260px, calc(50vh - var(--st-search-bar-half) - 24px));
    margin: 0;
    border: 0;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
    z-index: auto;
}

.site-header__search--overlay .site-header__search-close {
    top: 12px;
    transform: none;
}

.site-header__search-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: var(--muted-color);
    cursor: pointer;
    transition: all 0.15s ease;
}

.site-header__search-close:hover {
    background: var(--surface-alt-color);
    color: var(--heading-color);
}

.site-header__search-close .stc-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

@media (max-width: 600px) {
    .site-header__search--overlay {
        --st-search-bar-height: 54px;
        --st-search-bar-half: 27px;
        width: 92vw;
    }

    .site-header__search--overlay .site-header__search-bar {
        min-height: var(--st-search-bar-height);
    }

    .site-header__search--overlay input[type="search"] {
        height: var(--st-search-bar-height);
    }

    .site-header__search--overlay .site-header__search-close {
        top: 9px;
    }
}

/* ---- Smart search results panel (shared: overlay + inline variants) ----
   The panel is a child of the search <form>, which is the positioned
   ancestor for both variants (fixed for overlay, relative for inline) —
   so this stays anchored under whichever input is active. */
.stc-ajax-search__results {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 99;
}

.site-header__search--overlay .stc-ajax-search__results {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    box-shadow: none;
}

.stc-ajax-search__results.is-open {
    display: block;
}

.stc-ajax-search__status {
    padding: 18px 20px;
    color: var(--muted-color);
    font-size: 14px;
}

.stc-ajax-search__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light-color);
    transition: background 0.15s ease;
}

.stc-ajax-search__item:last-child {
    border-bottom: 0;
}

.stc-ajax-search__item:hover,
.stc-ajax-search__item.is-active {
    background: var(--surface-alt-color);
}

.stc-ajax-search__thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--surface-alt-color);
    object-fit: cover;
}

.stc-ajax-search__thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-color);
    font-size: 16px;
}

.stc-ajax-search__meta {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}

.stc-ajax-search__title {
    overflow: hidden;
    color: var(--heading-color);
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stc-ajax-search__price {
    color: var(--muted-color);
    font-size: 13px;
}

.stc-ajax-search__price del {
    margin-right: 6px;
    opacity: 0.6;
}

.stc-ajax-search__price ins {
    color: var(--brand-color);
    font-weight: 700;
    text-decoration: none;
}

.stc-ajax-search__viewall {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid var(--border-light-color);
    color: var(--brand-color);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.stc-ajax-search__viewall:hover {
    background: var(--surface-alt-color);
}

/* ---- My Account button ---- */
.site-header__myaccount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--brand-color);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-color) 22%, transparent);
    transition: background 0.15s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header__myaccount:hover {
    background: var(--brand-color-hover);
    color: #fff;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-color) 32%, transparent);
    transform: translateY(-1px);
}

/* Beats ".main-navigation a" (which sets a dark text color) on specificity
   so the CTA stays white inside the mobile drawer. */
.main-navigation .site-header__myaccount,
.main-navigation .site-header__myaccount:hover {
    color: #fff;
}

@media (max-width: 480px) {
    .site-header__myaccount {
        padding: 0 14px;
        font-size: 12.5px;
    }
}

/* ---- Variant: inline — classic always-visible search bar ---- */
.site-header__search--inline {
    flex: 0 1 300px;
    min-width: 0;
    max-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-alt-color);
    border: 1px solid var(--border-light-color);
    border-radius: 999px;
    height: 44px;
    padding: 0 18px 0 44px;
    transition: all 0.15s ease;
}

.site-header__search--inline:focus-within {
    background: var(--surface-color);
    border-color: var(--brand-color);
    box-shadow: 0 0 0 4px var(--brand-color-soft);
}

.site-header__search--inline .stc-icon.icon_search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-color);
    font-size: 15px;
    width: 15px;
    height: 15px;
    pointer-events: none;
}

.site-header__search--inline input[type="search"] {
    font-size: 14px;
}

@media (max-width: 1024px) {
    .site-header__search--inline {
        max-width: 220px;
        height: 40px;
        padding-left: 40px;
        padding-right: 14px;
    }

    .site-header__search--inline .stc-icon.icon_search {
        left: 14px;
    }
}

@media (max-width: 600px) {
    .site-header__inner {
        flex-wrap: wrap;
    }

    /* The inline search bar needs room to breathe, so give it (and the
       My Account button beside it) their own full-width row. The compact
       icon-only overlay trigger doesn't need this — it stays on row one,
       pinned to the far right of the logo. min-width: 0 lets this row
       actually shrink to fit instead of overflowing to fit the
       non-shrinking My Account button. */
    .site-header__actions:has(.site-header__search--inline) {
        order: 10;
        margin-left: 0;
        flex: 1 1 100%;
        min-width: 0;
    }

    .site-header__search--inline {
        flex: 1 1 auto;
        max-width: none;
    }
}

/* ---- Responsive: tablet ---- */
@media (max-width: 1180px) {
    .site-header__inner {
        gap: 16px;
    }

    .main-navigation a {
        padding: 9px 11px;
        font-size: 13.5px;
    }
}

/* 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) {
    .site-header__inner {
        gap: 10px;
        min-height: 64px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .site-header__menu-toggle {
        display: inline-flex;
    }

    /* Desktop-only instance — mobile shows My Account inside the drawer footer instead. */
    .site-header__myaccount--desktop {
        display: none;
    }

    .site-branding__mark {
        width: 28px;
        height: 28px;
        font-size: 16px;
        border-radius: 6px;
    }

    .site-branding__text {
        font-size: 17px;
    }

    .main-navigation {
        order: 5;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 100vh;
        max-height: 100dvh;
        background: var(--surface-color);
        padding: 0;
        transform: translateX(-100%);
        transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
        /* Above .site-header (z-index: 100) so the drawer fully replaces
           the sticky header instead of it showing through on top. */
        z-index: 101;
        flex: 0 0 auto;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .main-navigation.toggled {
        transform: translateX(0);
    }

    .main-navigation__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px;
        border-bottom: 1px solid var(--border-light-color);
        flex-shrink: 0;
        background: var(--surface-color);
    }

    /* Scrollable middle — the menu grows to fill the space between the
       sticky head and the sticky footer, scrolling internally if long. */
    .main-navigation__panel {
        display: block;
        width: 100%;
        padding: 8px;
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* My Account is pinned to the bottom of the drawer, like a footer,
       instead of scrolling away with a long menu. */
    .main-navigation__footer {
        display: block;
        flex-shrink: 0;
        padding: 16px;
        border-top: 1px solid var(--border-light-color);
    }

    .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%;
    }

    /* My Account sits with the menu inside the drawer, as a full-width
       CTA in the pinned footer, instead of in the header row. */
    .main-navigation__footer .site-header__myaccount {
        display: flex;
        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 {
        max-height: calc(100vh - 32px);
    }

    .main-navigation a {
        width: 100%;
        padding: 13px 14px;
        justify-content: flex-start;
        border-radius: 10px;
    }

    .main-navigation a:hover,
    .main-navigation .current-menu-item>a {
        background: var(--brand-color-soft);
        color: var(--brand-color-hover);
    }

    /* 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: 50%;
        right: 8px;
        z-index: 2;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        background: transparent;
        border: 0;
        border-radius: 0;
        color: var(--muted-color);
        cursor: pointer;
        transition: color 0.15s ease;
    }

    .main-navigation .menu-item-toggle:hover {
        background: transparent;
        color: var(--heading-color);
    }

    .main-navigation .menu-item-toggle .stc-icon {
        font-size: 15px;
        width: 15px;
        height: 15px;
        transition: transform 0.18s ease;
    }

    .main-navigation .menu-item-has-children.is-open>.menu-item-toggle .stc-icon {
        transform: rotate(180deg);
    }

    .main-navigation .sub-menu {
        position: static;
        top: auto;
        transform: none;
        box-shadow: none;
        border: 0;
        margin-top: 0;
        margin-left: 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 .sub-menu::before {
        display: none;
    }

    .main-navigation .menu-item-has-children.is-open>.sub-menu {
        max-height: 3000px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    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 {
        max-height: calc(100vh - 46px);
    }
}

/* ---- 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, background 0.22s ease;
    z-index: 95;
}

body.st-drawer-open .site-header__drawer-overlay {
    opacity: 1;
    visibility: visible;
}

/* Search modal: stronger dim so focus stays on the form. */
body.st-search-open .site-header__drawer-overlay {
    background: rgba(15, 23, 42, 0.72);
}

/* Lock body scroll when any drawer is open (tablet+ as well). */
body.st-drawer-open {
    overflow: hidden;
}

/* ---- Responsive: narrow mobile ---- */
@media (max-width: 600px) {
    .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;
    }
}


/* =========================================================================
   6. Page hero / archive header
   ========================================================================= */
/* Aurora banner: layered indigo/violet/cyan glows over a deep navy wash,
   a fading line grid and a drifting glow orb on pseudo-elements so every
   template using the banner picks this up without markup changes. */
.st-page-hero {
    position: relative;
    background-color: #090e1f;
    background-image:
        radial-gradient(ellipse 55% 75% at 78% -12%, rgba(99, 102, 241, 0.38), transparent 62%),
        radial-gradient(ellipse 45% 65% at 10% 118%, rgba(139, 92, 246, 0.24), transparent 58%),
        radial-gradient(ellipse 34% 55% at 100% 92%, rgba(56, 189, 248, 0.13), transparent 55%),
        linear-gradient(135deg, #0a0f22 0%, #101638 52%, #191f4c 100%);
    color: #fff;
    padding: 88px 0 68px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: inset 0 -1px 0 rgba(129, 140, 248, 0.25);
}

.st-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 85% 130% at 72% -10%, rgba(0, 0, 0, 0.9), transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 85% 130% at 72% -10%, rgba(0, 0, 0, 0.9), transparent 72%);
    pointer-events: none;
}

.st-page-hero::after {
    content: "";
    position: absolute;
    top: -170px;
    right: -50px;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5), rgba(139, 92, 246, 0.18) 45%, transparent 70%);
    filter: blur(64px);
    animation: st-hero-drift 9s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes st-hero-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-40px, 28px, 0) scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-page-hero::after {
        animation: none;
    }
}

.st-page-hero .st-container {
    position: relative;
    z-index: 1;
}

.st-page-hero h1,
.st-page-hero .page-title {
    color: #fff;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    background: linear-gradient(180deg, #fff 55%, #c3caff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.st-page-hero p,
.st-page-hero .archive-description {
    color: var(--text-on-dark-color);
    max-width: 720px;
    margin: 0;
}

.st-page-hero__breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(2, 6, 23, 0.35);
    color: rgba(229, 231, 235, 0.78);
    font-size: 13px;
    margin-bottom: 16px;
}

.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.2;
    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(--brand-color);
    font-size: 13px;
    font-weight: 600;
}

.entry-meta--single .entry-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-color);
}

.entry-meta--single .entry-meta__item .stc-icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    color: var(--brand-color);
}

.entry-meta--single .entry-meta__item a {
    color: inherit;
    text-decoration: none;
}

.entry-meta--single .entry-meta__item a:hover {
    color: var(--brand-color-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(--surface-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--radius-lg, 16px);
    padding: 36px;
    box-shadow: var(--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(--heading-color);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.st-content-card .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--muted-color);
    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(--surface-alt-color);
}

.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.8;
    color: var(--text-color);
    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(--heading-color);
}

.st-content-card .entry-content h3 {
    font-size: 1.2rem;
    margin: 1em 0 0.5em;
    color: var(--heading-color);
}

.st-content-card .entry-content a {
    color: var(--brand-color-hover);
    text-decoration: underline;
}

.st-content-card .entry-content blockquote {
    border-left: 4px solid var(--brand-color);
    background: var(--brand-color-soft);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--heading-color);
}

.st-content-card .entry-content code {
    background: var(--surface-alt-color);
    border: 1px solid var(--border-light-color);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.92em;
}

.st-content-card .entry-content pre {
    background: var(--dark-color);
    color: #e2e8f0;
    border-radius: var(--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(--radius-sm);
    margin: 1em auto;
}

.st-content-card .entry-footer {
    margin-top: 24px;
    padding: 18px 0 0;
    border-top: 1px solid var(--border-light-color);
    color: var(--muted-color);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.st-content-card:hover {
    transform: none;
    box-shadow: var(--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;
    }
}

/* Pages: clean by default  -  keep the typography rules above but drop the
   card surface (background, border, shadow); keep a standard vertical
   rhythm (matches .st-section spacing) instead of the card's own padding. */
.st-content-card--plain {
    background: none;
    border: none;
    border-radius: 0;
    padding: 40px 0;
    box-shadow: none;
}

.st-content-card--plain:hover {
    box-shadow: none;
}

.st-content-card--plain .post-thumbnail {
    margin: 0 0 26px;
}

@media (max-width: 768px) {
    .st-content-card--plain {
        padding: 28px 0;
    }

    .st-content-card--plain .post-thumbnail {
        margin: 0 0 18px;
    }
}

article.post,
article.st-card {
    background: var(--surface-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--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(--border-color);
    box-shadow: var(--shadow-md);
}

article .post-thumbnail {
    display: block;
    overflow: hidden;
    background: var(--surface-alt-color);
    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.4;
}

article .entry-title a {
    color: var(--heading-color);
}

article .entry-title a:hover {
    color: var(--brand-color-hover);
}

article .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--muted-color);
    font-size: 12px;
    font-weight: 600;
}

article .entry-meta a {
    color: inherit;
}

article .entry-content,
article .entry-summary {
    padding: 4px 18px 0;
    color: var(--text-color);
}

article .entry-footer {
    padding: 12px 18px 18px;
    color: var(--muted-color);
    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 {
    border-radius: var(--radius-lg);
    padding: 32px 36px 36px;
}

.single article.post .entry-header,
.single article.post .entry-content,
.single article.post .entry-footer {
    padding: 0;
}

.single article.post .entry-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin: 12px 0;
}

.single article.post .post-thumbnail {
    margin: 0 -36px 24px;
    aspect-ratio: 21 / 9;
}

.single article.post .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.single article.post .entry-content h2 {
    margin-top: 1.6em;
}

.single article.post .entry-content blockquote {
    border-left: 4px solid var(--brand-color);
    background: var(--brand-color-soft);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--heading-color);
}

.single article.post .entry-content code {
    background: var(--surface-alt-color);
    border: 1px solid var(--border-light-color);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.92em;
}

.single article.post .entry-content pre {
    background: var(--dark-color);
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 18px;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 0.92em;
}

@media (max-width: 768px) {

    .single article.post {
        padding: 22px 18px 24px;
    }

    .single article.post .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(--surface-alt-color);
    color: var(--text-color);
    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(--brand-color-soft);
    color: var(--brand-color-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(--surface-color);
    border: 1px solid var(--border-light-color);
    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(--border-light-color);
}

.post-card__media {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 10;
    background: var(--surface-alt-color);
    position: relative;
}

.post-card__media img {
    width: 100%;
    height: 100%;
    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(--brand-color, #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(--brand-color, #16a34a);
}

.post-card__meta-item .stc-icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    color: var(--brand-color, #16a34a);
    flex-shrink: 0;
}

.post-card__meta-item a {
    color: inherit;
    text-decoration: none;
}

.post-card__meta-item a:hover {
    color: var(--brand-color-hover, #15803d);
    text-decoration: underline;
}

.post-card__title {
    font-size: clamp(20px, 1.9vw, 26px);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 14px;
    color: var(--heading-color);
    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(--brand-color-hover, #15803d);
    background-size: 100% 1.5px;
}

.post-card__excerpt {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.7;
    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(--brand-color, #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(--brand-color-hover, #15803d);
}

.post-card__readmore .stc-icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.post-card__readmore:hover .stc-icon {
    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(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    background: var(--surface-color);
    transition: border-color 0.15s ease, color 0.15s ease;
    max-width: 320px;
}

.nav-previous a:hover,
.nav-next a:hover {
    border-color: var(--brand-color);
    color: var(--brand-color-hover);
}

.nav-subtitle {
    color: var(--muted-color);
    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(--surface-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--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(--border-light-color);
}

.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(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    background: var(--surface-color);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.comment-form .submit {
    background: linear-gradient(135deg, var(--brand-color), var(--brand-color-hover));
    color: #fff;
    border: 0;
    padding: 12px 22px;
    border-radius: var(--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(--surface-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--radius);
    padding: 18px;
}

.widget-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--heading-color);
}

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

.widget li a {
    color: var(--text-color);
    font-weight: 600;
}

.widget li a:hover {
    color: var(--brand-color-hover);
}

/* 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(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--heading-color);
    font-size: 14px;
}

.search-form .search-submit {
    flex: 0 0 auto;
    background: var(--brand-color);
    color: #fff;
    border: 0;
    padding: 0 18px;
    min-height: 42px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
}

.search-form .search-submit:hover {
    background: var(--brand-color-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(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--heading-color);
    font-size: 14px;
}

.wp-block-search__button {
    flex: 0 0 auto;
    background: var(--brand-color);
    color: #fff;
    border: 0;
    padding: 0 18px;
    min-height: 42px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
}

.wp-block-search__button:hover {
    background: var(--brand-color-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(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--heading-color);
    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(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--heading-color);
    font: inherit;
    font-size: 14px;
}

.widget input:focus,
.widget textarea:focus,
.widget select:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-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(--border-light-color);
    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(--text-color);
    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(--brand-color-hover);
}

/* Counts — `(12)` in Categories / Archives */
.widget_archive li,
.widget_categories li {
    color: var(--muted-color);
    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(--border-light-color);
}

.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(--muted-color);
    font-size: 12px;
    font-weight: 600;
}

.widget_rss cite {
    display: block;
    margin-top: 4px;
    color: var(--muted-color);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.widget_rss .rssSummary {
    margin-top: 6px;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.6;
}

/* Recent comments */
.widget_recent_comments .comment-author-link {
    color: var(--heading-color);
    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(--surface-alt-color);
    color: var(--text-color);
    border: 1px solid var(--border-light-color);
    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(--brand-color-soft);
    color: var(--brand-color-hover);
    border-color: color-mix(in srgb, var(--brand-color) 30%, transparent);
}

.widget_tag_cloud a .tag-link-count,
.wp-block-tag-cloud a .tag-link-count {
    color: var(--muted-color);
    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(--text-color);
}

.widget_calendar caption,
.wp-block-calendar caption,
.calendar_wrap caption {
    font-size: 13px;
    font-weight: 700;
    color: var(--heading-color);
    padding: 6px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.widget_calendar th,
.wp-block-calendar th,
.calendar_wrap th {
    background: var(--surface-alt-color);
    color: var(--muted-color);
    font-size: 11px;
    font-weight: 700;
    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(--surface-color);
}

.widget_calendar tbody td a,
.wp-block-calendar tbody td a,
.calendar_wrap tbody td a {
    display: block;
    background: var(--brand-color-soft);
    color: var(--brand-color);
    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(--brand-color);
    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(--brand-color);
    text-decoration: none;
}

.widget_calendar nav a:hover,
.wp-block-calendar nav a:hover,
.calendar_wrap .wp-calendar-nav a:hover {
    color: var(--brand-color-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(--border-light-color);
}

.wp-block-latest-posts>li:last-child {
    border-bottom: 0;
}

.wp-block-latest-posts__post-title {
    display: block;
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.wp-block-latest-posts__post-title:hover {
    color: var(--brand-color-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(--muted-color);
}

.wp-block-latest-posts__post-excerpt {
    margin-top: 6px;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.6;
}

.wp-block-latest-posts__featured-image img {
    border-radius: var(--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(--border-light-color);
    line-height: 1.5;
}

.wp-block-latest-comments__comment:last-child {
    border-bottom: 0;
}

.wp-block-latest-comments__comment-meta {
    color: var(--text-color);
    font-size: 13px;
}

.wp-block-latest-comments__comment-meta a {
    color: var(--heading-color);
    font-weight: 700;
    text-decoration: none;
}

.wp-block-latest-comments__comment-meta a:hover {
    color: var(--brand-color-hover);
}

.wp-block-latest-comments__comment-date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted-color);
    font-weight: 600;
}

.wp-block-latest-comments__comment-excerpt p {
    margin: 6px 0 0;
    color: var(--text-color);
    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(--border-light-color);
}

.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(--text-color);
    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(--brand-color-hover);
}

.wp-block-archives-dropdown select,
.wp-block-categories select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--heading-color);
    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(--border-light-color);
    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(--border-light-color);
}

.wp-block-rss__item:last-child {
    border-bottom: 0;
}

.wp-block-rss__item-title a {
    color: var(--heading-color);
    font-weight: 700;
    text-decoration: none;
}

.wp-block-rss__item-title a:hover {
    color: var(--brand-color-hover);
}

.wp-block-rss__item-publish-date,
.wp-block-rss__item-author {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted-color);
    font-weight: 600;
}

.wp-block-rss__item-excerpt {
    margin-top: 6px;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.6;
}

/* --- Block: Search ------------------------------------------------------ */
.wp-block-search .wp-block-search__label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--heading-color);
}

.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(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--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(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-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(--surface-alt-color);
    border: 1px solid var(--border-light-color);
    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(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
}

.wp-block-social-links .wp-social-link a {
    color: inherit;
}

/* --- Block: Buttons ----------------------------------------------------- */
.wp-block-buttons {
    gap: 10px;
}

.wp-block-button__link {
    background: var(--brand-color);
    color: #fff;
    border: 0;
    padding: 12px 22px;
    border-radius: var(--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(--brand-color-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(--brand-color);
    border: 2px solid var(--brand-color);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--brand-color);
    color: #fff;
}

/* --- Block: Quote / Pullquote / Code / Preformatted / Verse ------------- */
.wp-block-quote,
blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    background: var(--brand-color-soft);
    border-left: 4px solid var(--brand-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--heading-color);
    font-style: italic;
}

.wp-block-quote cite,
blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted-color);
    font-style: normal;
    font-weight: 700;
}

.wp-block-pullquote {
    margin: 32px 0;
    padding: 24px;
    border-top: 3px solid var(--brand-color);
    border-bottom: 3px solid var(--brand-color);
    text-align: center;
    color: var(--heading-color);
    font-size: 1.15rem;
    font-weight: 600;
}

.wp-block-pullquote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted-color);
    font-style: normal;
}

.wp-block-code,
pre.wp-block-preformatted,
.wp-block-verse {
    background: var(--dark-color);
    color: #e2e8f0;
    border-radius: var(--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(--border-light-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: 14px;
    margin: 18px 0;
}

.wp-block-table th,
.entry-content table th {
    background: var(--surface-alt-color);
    color: var(--heading-color);
    font-weight: 700;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light-color);
}

.wp-block-table td,
.entry-content table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light-color);
    color: var(--text-color);
}

.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(--surface-alt-color);
}

/* --- Block: Separator / Spacer ----------------------------------------- */
.wp-block-separator {
    border: 0;
    height: 1px;
    background: var(--border-light-color);
    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(--muted-color);
    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(--radius-sm);
    height: auto;
    max-width: 100%;
}

.wp-block-image figcaption,
figcaption {
    text-align: center;
    color: var(--muted-color);
    font-size: 12px;
    margin-top: 8px;
}

.wp-block-gallery .blocks-gallery-item img,
.wp-block-gallery img {
    border-radius: var(--radius-sm);
}

.wp-block-cover {
    border-radius: var(--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(--radius-sm);
}

.wp-block-file {
    background: var(--surface-alt-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wp-block-file a:first-child {
    color: var(--heading-color);
    font-weight: 700;
    text-decoration: none;
}

.wp-block-file__button {
    background: var(--brand-color);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
}

.wp-block-file__button:hover {
    background: var(--brand-color-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(--heading-color);
    line-height: 1.3;
    margin: 1.4em 0 0.6em;
    font-weight: 700;
}

/* --- 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(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
}

.site-footer .wp-block-quote,
.site-footer blockquote {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--brand-color);
    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: 700;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--brand-color), var(--brand-color-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(--muted-color);
    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(--surface-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--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(--muted-color);
}

.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(--text-color);
    font-weight: 600;
    padding: 6px 0;
}

.error-404 .st-error__suggestions li a span {
    color: var(--muted-color);
    font-weight: 700;
}

.error-404 .st-error__suggestions li a:hover {
    color: var(--brand-color-hover);
}

/* =========================================================================
   11. Footer
   ========================================================================= */
.site-footer {
    margin-top: 60px;
    background: var(--dark-color);
    color: var(--text-on-dark-color);
}

.site-footer a {
    color: var(--text-on-dark-color);
}

.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 minmax(0, 1fr) minmax(0, 1fr) 1.6fr;
}

.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: 700;
    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 {
    flex: 0 1 auto; /* keep the pointer on the text only, not the full row */
    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__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 / 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.6;
}

.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(--brand-color);
    border-color: var(--brand-color);
    color: #fff;
}

.st-about__socials .stc-icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.st-newsletter__before,
.st-newsletter__after {
    margin: 0 0 12px;
    color: rgba(229, 231, 235, 0.7);
    font-size: 13px;
    line-height: 1.6;
}

.st-newsletter__after {
    margin: 12px 0 0;
}

.st-newsletter__content {
    margin: 0 0 18px;
    color: rgba(229, 231, 235, 0.7);
    font-size: 13px;
    line-height: 1.6;
}

.st-newsletter__content p {
    margin: 0;
}

.st-newsletter__shortcode>* {
    color: inherit;
}

.st-newsletter .st-newsletter__shortcode form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 100px;
    padding: 5px;
}

.st-newsletter .st-newsletter__shortcode form:focus-within {
    border-color: color-mix(in srgb, var(--brand-color) 60%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-color) 15%, transparent);
}

.st-newsletter .st-newsletter__shortcode form p,
.st-newsletter .st-newsletter__shortcode form fieldset,
.st-newsletter .st-newsletter__shortcode form label,
.st-newsletter .st-newsletter__shortcode form label span {
    display: contents;
}

.st-newsletter .st-newsletter__shortcode form br {
    display: none;
}

.st-newsletter .st-newsletter__shortcode form input[type="email"],
.st-newsletter .st-newsletter__shortcode form input[type="text"] {
    flex: 1 1 0;
    order: 1;
    min-width: 0;
    height: 44px;
    margin: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 8px 0 18px;
    font-size: 14px;
    color: #fff;
}

.st-newsletter .st-newsletter__shortcode form input::placeholder {
    color: rgba(229, 231, 235, 0.55);
}

/* Chrome paints autofilled inputs pale blue with UA styles that ignore
   `background` — clip the background to the text so the pill stays dark. */
.st-newsletter .st-newsletter__shortcode form input:-webkit-autofill,
.st-newsletter .st-newsletter__shortcode form input:-webkit-autofill:hover,
.st-newsletter .st-newsletter__shortcode form input:-webkit-autofill:focus {
    -webkit-background-clip: text;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}

.st-newsletter .st-newsletter__shortcode form button[type="submit"],
.st-newsletter .st-newsletter__shortcode form input[type="submit"] {
    flex: 0 0 auto;
    order: 2;
    margin-left: auto;
    height: 44px;
    margin: 0;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-color);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.st-newsletter .st-newsletter__shortcode form button[type="submit"]:hover,
.st-newsletter .st-newsletter__shortcode form input[type="submit"]:hover {
    background: var(--brand-color-hover);
}

/* CF7 status/validation messages drop to a full-width row under the pill. */
.st-newsletter .st-newsletter__shortcode form .wpcf7-not-valid-tip,
.st-newsletter .st-newsletter__shortcode form .wpcf7-response-output {
    order: 3;
    width: 100%;
    margin: 6px 14px 2px;
    padding: 0;
    border: 0;
    font-size: 12px;
    line-height: 1.4;
}

/* Antimanual (AMF) newsletter form — markup is form > .amf-fields > .amf-field
   (label / input / .amf-field-error) + .amf-actions > button + .amf-message.
   Flatten the wrappers so the input and button share the pill row; errors and
   status messages drop to full-width rows below it. */
.st-newsletter .amf-form {
    max-width: none;
    margin: 0;
    position: relative;
}

.st-newsletter .amf-fields,
.st-newsletter .amf-field {
    display: contents;
}

/* Visually hidden but kept for screen readers; the placeholder labels the
   pill. Needs the long selector to beat the generic `form label` flattener. */
.st-newsletter .st-newsletter__shortcode form .amf-label {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.st-newsletter .amf-actions {
    order: 2;
    margin: 0 0 0 auto;
}

/* The plugin prints per-form inline styles against #amf-form-N, which
   out-specifies any class selector — hence the !important. */
.st-newsletter .amf-submit {
    height: 44px;
    padding: 0 26px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--brand-color) !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1;
}

.st-newsletter .amf-submit:hover {
    background: var(--brand-color-hover) !important;
    opacity: 1;
}

/* Errors and status messages must stay children of the form (the plugin JS
   looks them up with querySelector inside it), so they can't leave the pill
   in normal flow — anchor them just below the border instead. */
.st-newsletter .amf-field-error,
.st-newsletter .amf-message {
    position: absolute;
    top: 100%;
    left: 14px;
    right: 14px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.4;
}

/* Both share the row below the pill — when a field error is showing, the
   generic "correct the highlighted fields" message is redundant. */
.st-newsletter .amf-form:has(.amf-field.has-error) .amf-message-error {
    display: none;
}

.st-newsletter .amf-field-error:empty {
    display: none;
}

.st-newsletter .amf-field-error,
.st-newsletter .amf-message-error {
    color: #fca5a5;
}

.st-newsletter .amf-message-success {
    color: #6ee7b7;
}

/* Plugin's dismiss-button hover is black-alpha — invisible on the dark footer. */
.st-newsletter .amf-message-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* CF7 appends a spinner span after the button — it reserves ~70px and pushes
   the button off the right edge, so hide it. */
.st-newsletter .st-newsletter__shortcode form .wpcf7-spinner {
    display: none;
}

/* Inherit Customizer footer colors when set. */
.site-footer {
    background: var(--footer-bg, var(--heading-color));
}

@media (max-width: 1024px) {

    .site-footer__widgets--cols-3,
    .site-footer__widgets--cols-4 {
        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 {
        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(--heading-color);
    font-size: 1.25rem;
    font-weight: 700;
    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(--surface-alt-color);
    border: 1px solid var(--border-light-color);
    border-radius: var(--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(--border-light-color);
}

.comment-list .comment-author .fn {
    color: var(--heading-color);
    font-weight: 700;
    font-size: 14px;
    font-style: normal;
}

.comment-list .comment-author .says {
    display: none;
}

.comment-list .comment-metadata {
    color: var(--muted-color);
    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(--brand-color-hover);
}

.comment-list .comment-content {
    color: var(--text-color);
    font-size: 14.5px;
    line-height: 1.7;
}

.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(--brand-color-soft);
    color: var(--brand-color);
    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(--brand-color);
    color: #fff;
}

.comment-list .children {
    margin: 12px 0 0 28px;
    padding-left: 16px;
    border-left: 2px solid var(--border-light-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-list .bypostauthor>.comment-body {
    border-color: color-mix(in srgb, var(--brand-color) 30%, transparent);
    background: var(--brand-color-soft);
}

.comment-list .bypostauthor>.comment-body::before {
    content: attr(data-author-badge, "Author");
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--brand-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
}

.comment-respond {
    margin-top: 20px;
}

.comment-reply-title {
    color: var(--heading-color);
    font-size: 1.1rem;
    font-weight: 700;
}

.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(--heading-color);
}

.comment-form .required {
    color: var(--brand-color);
    margin-left: 2px;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--muted-color);
    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(--muted-color);
    font-size: 13px;
}

.no-comments {
    color: var(--muted-color);
    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);
    }
}

/* --plain has no side padding, so wide/full blocks need no offset to "pop". */
.st-content-card--plain .alignwide,
.st-content-card--plain>.alignwide,
.st-content-card--plain .entry-content>.alignwide {
    margin-left: 0;
    margin-right: 0;
}

.st-content-card--plain .alignfull,
.st-content-card--plain>.alignfull,
.st-content-card--plain .entry-content>.alignfull {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* =========================================================================
   12. Page-links / utilities
   ========================================================================= */
.page-links {
    margin: 18px 0;
    font-weight: 700;
    color: var(--muted-color);
    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(--border-color);
    background: var(--surface-color);
}

.page-links>span {
    background: var(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
}

/* 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(--muted-color);
    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(--brand-color, #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(--muted-color, #666);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}

.stc-filter-clear:hover {
    color: var(--danger-color, #DC2626);
    background: rgba(220, 38, 38, .06);
}

.stc-filter-clear .stc-icon {
    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 {
    --danger-color: #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;
}

/* ── Product card: ThemeForest-style overrides ───────────────────────────── */

/* Live Preview: outlined pill button matching ThemeForest style */
.stc-grid-item .item-preview-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color, #1e293b);
    text-decoration: none;
    padding: 6px 14px;
    border: 1.5px solid #c8cdd5;
    border-radius: 4px;
    background: transparent;
    line-height: 1.4;
    white-space: nowrap;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.stc-grid-item .item-preview-link:hover {
    color: var(--brand-color, #4f46e5);
    border-color: var(--brand-color, #4f46e5);
    background: color-mix(in srgb, var(--brand-color, #4f46e5) 6%, transparent);
    border-bottom-color: var(--brand-color, #4f46e5);
}

/* ── Premium Pricing Card & License Selector ────────────────────────────── */
.stc-purchase-panel.pricing-card {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius, 12px);
    padding: 24px;
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(15, 23, 42, 0.05));
    transition: box-shadow 0.3s ease;
}

.stc-purchase-panel.pricing-card:hover {
    box-shadow: var(--shadow-md, 0 12px 28px rgba(15, 23, 42, 0.08));
}

/* Price Display Stack */
.purchase-card-top {
    margin-bottom: 20px;
}

.purchase-price-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.purchase-price-stack .license-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.purchase-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.purchase-current-price {
    font-size: 38px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}

.purchase-original-price {
    font-size: 16px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.purchase-sale-badge {
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
    background: #ecfdf5;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
    text-transform: uppercase;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* Feature list / details */
.license-details {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.license-details li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    line-height: 1.4;
}

.license-details li .check {
    color: #10b981;
    background-color: #d1fae5;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

/* Purchase Button styling overrides */
#stc-purchase-card button.full-width {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-color, #5966fb) 16%, transparent);
}

#stc-purchase-card button.stc-btn-primary {
    background: var(--brand-color, #5966fb);
    color: #ffffff;
}

#stc-purchase-card button.stc-btn-primary:hover:not(:disabled) {
    background: var(--brand-color-hover, #4a54e0);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-color, #5966fb) 25%, transparent);
}

#stc-purchase-card button.stc-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    margin-top: 10px;
    box-shadow: none;
}

#stc-purchase-card button.stc-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

#stc-purchase-card button:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.pricing-disclaimer {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 14px 0 0 0;
    text-align: center;
}

/* ============================================================
   PRODUCT LIST CARDS — Elevated marketplace design
   ============================================================ */

/* Card shell */
.stc-market-item {
    border-radius: 16px;
    border-color: #eef1f8;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.26s ease, border-color 0.26s ease, transform 0.26s ease;
}

.stc-market-item:hover {
    border-color: rgba(89, 102, 251, 0.28);
    box-shadow: 0 12px 36px rgba(89, 102, 251, 0.12), 0 2px 8px rgba(15, 23, 42, 0.05);
    transform: translateY(-3px);
}

/* Thumbnail hover zoom */
.stc-market-item__thumb img {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stc-market-item:hover .stc-market-item__thumb img {
    transform: scale(1.04);
}

/* Title link hover color */
.stc-market-item__body h3 a:hover {
    color: var(--brand-color, #5966fb);
    text-decoration: none;
}

/* Actions panel — subtle cool tint on the right column */
.stc-catalog-layout--list .stc-market-item__actions {
    border-left-color: #eef0fb;
    padding: 22px 20px;
}


/* Stats column — rating on top, sales below (column-reverse flips DOM order) */
.stc-market-item__stats {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 6px;
}

/* Price — strong, dark, letterspace tight */
.stc-market-item__price {
    font-size: 26px;
    font-weight: 700;
    color: #1d2746;
    letter-spacing: -0.6px;
    line-height: 1;
}

/* Sales count — plain muted text, no pill */
.stc-market-item__sales {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    border: none;
    line-height: 1.4;
    white-space: nowrap;
}

.stc-market-item__sales .stc-icon {
    display: none;
}

/* Rating stars — amber/gold, 20px, prominent */
.stc-card-star {
    font-size: 14px;
    line-height: 1;
    display: inline-block;
}

.stc-card-star--full {
    color: #F59E0B;
}

.stc-card-star--half {
    color: #FBBF24;
}

.stc-card-star--empty {
    color: #D1D5DB;
}

/* Rating numeric average — dark, bold, next to stars */
.stc-card-rating-avg {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-left: 5px;
}

/* Review count — muted, lighter */
.stc-card-rating-count {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 2px;
}

/* Rating row container */
.stc-market-item__rating,
.stc-card-rating {
    gap: 1px;
    font-size: 19px;
    align-items: center;
}

/* Hide author name, move category to left */
.stc-market-item__meta {
    justify-content: flex-start;
}

.stc-market-item__meta>span:first-child {
    display: none;
}

/* Override plugin: remove per-span margin and set size */
.stc-catalog-wrap .stc-market-item__rating span {
    margin-left: 0;
    font-size: 14px;
}

/* Cart icon button */
.stc-market-cart-btn {
    border-radius: 10px;
    flex-shrink: 0;
}

.stc-catalog-wrap .stc-market-cart-btn {
    width: 36px;
    height: 36px;
}

/* Live Preview ghost button */
.stc-market-btn--ghost {
    border-color: #e2e8f0;
    color: #475569;
    font-weight: 600;
    border-radius: 10px;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
    white-space: nowrap;
}

.stc-market-btn--ghost:hover {
    border-color: var(--brand-color, #5966fb);
    color: var(--brand-color, #5966fb);
    background: rgba(89, 102, 251, 0.05);
}

/* Gap between product cards */
.stc-catalog-items {
    gap: 20px;
}