/* ==========================================================================
   SitoWeb.AI - Main Stylesheet
   Commit-style: Fixed sidebar + sky blue palette
   ========================================================================== */

/* ---------- Variable Fonts ---------- */
@font-face {
    font-family: 'Mona Sans';
    src: url('../fonts/Mona-Sans.var.woff2') format('woff2');
    font-weight: 200 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-roman.var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-italic.var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: italic;
}

/* ---------- CSS Variables ---------- */
:root {
    /* Neon Yellow + B&W Palette */
    --color-primary: #d4ff00;       /* neon yellow */
    --color-primary-dark: #bfe600;  /* neon yellow darker */
    --color-primary-light: #e8ff66; /* neon yellow lighter */
    --color-accent: #d4ff00;
    --color-accent-dark: #bfe600;

    /* Semantic */
    --color-success: #4ade80;
    --color-warning: #fbbf24;
    --color-danger: #f87171;
    --color-info: #d4ff00;

    /* Dark Theme (Pure Black) */
    --color-black: #000000;
    --color-bg: #0a0a0a;
    --color-bg-alt: #141414;
    --color-bg-dark: #000000;
    --color-bg-card: rgba(255, 255, 255, 0.03);
    --color-border: #2a2a2a;
    --color-border-dark: #141414;
    --color-text: #ffffff;
    --color-text-light: #a0a0a0;
    --color-text-muted: #666666;

    /* Typography */
    --font-display: 'Mona Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Borders */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout — matches Commit: calc(max(2rem,50%-38rem)+40rem) */
    --sidebar-width: max(42rem, 50vw);
    --container-max: 1120px;
    --container-narrow: 720px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul, ol {
    list-style: none;
}

/* Headings use display font */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Layout: Fixed Sidebar + Main Content ---------- */
.site-layout {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.site-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 40;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--color-bg-dark);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: #000000;
}

.sidebar-glow svg {
    position: absolute;
    top: -40%;
    right: -2.5rem;
    width: 80rem;
    height: 180%;
}

.sidebar-divider {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: white;
    mix-blend-mode: overlay;
    z-index: 1;
}

.sidebar-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 28rem;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-6) 0 var(--space-6) var(--space-6);
}

.sidebar-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-6) 0;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: var(--space-6);
}

/* Star field container */
.star-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 0;
}

/* ---------- Sidebar Logo ---------- */
.sidebar-logo {
    margin-bottom: var(--space-8);
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text);
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-logo .logo-name strong {
    color: var(--color-primary);
}

/* ---------- Sidebar Intro (Homepage) ---------- */
.sidebar-intro {
    margin-top: 3.5rem;
}

.sidebar-intro h1 {
    font-family: var(--font-display);
    font-size: var(--font-size-4xl);
    font-weight: 300;
    line-height: 1.1;
    color: var(--color-text);
    margin-bottom: 0;
}

.sidebar-intro h1 .text-accent {
    color: var(--color-primary);
}

.sidebar-intro p {
    font-size: var(--font-size-lg);
    line-height: 1.5rem;
    color: #a0a0a0;
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
}

/* ---------- Sidebar Navigation ---------- */
.sidebar-nav .nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-menu li a {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.sidebar-nav .nav-menu li a:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-menu li.current-menu-item a {
    color: var(--color-primary);
}

/* ---------- Sidebar Utils ---------- */
.sidebar-utils {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

/* ---------- Sidebar Footer ---------- */
.sidebar-footer {
    font-size: 0.8125rem;
    line-height: 1.5rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

/* ---------- Sidebar Form (Analyzer in sidebar) ---------- */
/* The form itself is the single rounded container (like Commit's SignUpForm) */
.sidebar-form {
    position: relative;
    isolation: isolate;
    margin-top: var(--space-8);
    background: rgba(255, 255, 255, 0.025);
    border-radius: var(--radius-lg);
    /* ring-1 ring-white/15 */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Focus ring on the whole form container */
.sidebar-form:focus-within {
    box-shadow:
        inset 0 0 0 1px rgba(212, 255, 0, 0.4),
        0 0 0 4px rgba(212, 255, 0, 0.08);
}

.sidebar-form-group {
    margin-bottom: 0;
}

/* Input wrappers: no border/bg, the form container handles it */
.sidebar-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 0;
}

/* URL row: separator line at bottom */
.sidebar-form-group .sidebar-input-wrap {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Email + button row */
.sidebar-form-row {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.375rem 0.25rem 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.sidebar-form-row .sidebar-input-wrap {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 0;
    min-width: 0;
}

.sidebar-input-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--color-text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.sidebar-input-wrap input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    outline: none;
    min-width: 0;
}

.sidebar-input-wrap input::placeholder {
    color: var(--color-text-muted);
}

.sidebar-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-family: var(--font-family);
    font-size: 0.8125rem;
    line-height: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    gap: 0.25rem;
}

/* Gradient overlay (from-white/80 to-white at 10% opacity) */
.sidebar-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), #fff);
    opacity: 0.10;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

/* Inset shadow (inset 0 1px 1px white at 7.5% opacity) */
.sidebar-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 1px #fff;
    opacity: 0.075;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.sidebar-submit:hover::before {
    opacity: 0.15;
}

.sidebar-submit:hover::after {
    opacity: 0.10;
}

.sidebar-submit .btn-arrow {
    font-size: 1rem;
}

.sidebar-form .analyzer-error {
    margin-top: var(--space-2);
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-3);
}

/* ---------- Sidebar Icon Links ---------- */
.sidebar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-top: var(--space-8);
}

.sidebar-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-light);
    border-radius: 0;
    border: 1px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.sidebar-icon-link:hover {
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-icon-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ---------- Theme Toggle Float (top-right of content) ---------- */
.theme-toggle-float {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 50;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.theme-toggle-float:hover {
    border-color: var(--color-text-muted);
}

/* WP admin bar: offset fixed elements (32px desktop, 46px mobile handled in @media) */
.admin-bar .site-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

.admin-bar .theme-toggle-float {
    top: calc(var(--space-4) + 32px);
}

/* ---------- Main Content ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    position: relative;
    transition: margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Compact sidebar (during analysis) ---------- */
@media (min-width: 1025px) {
    .site-sidebar.is-compact {
        width: max(28rem, 30vw);
    }

    .site-sidebar.is-compact ~ .timeline-decoration {
        left: max(28rem, 30vw);
    }

    .site-sidebar.is-compact ~ .main-content {
        margin-left: max(28rem, 30vw);
    }
}

/* ---------- Narrow sidebar on inner pages ---------- */
@media (min-width: 1025px) {
    body:not(.home) .site-sidebar {
        width: max(22rem, 22vw);
    }

    body:not(.home) .timeline-decoration {
        left: max(22rem, 22vw);
    }

    body:not(.home) .main-content {
        margin-left: max(22rem, 22vw);
    }
}

.site-main {
    padding: 0;
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* ---------- Timeline Decoration ---------- */
.timeline-decoration {
    pointer-events: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--sidebar-width);
    width: 6px;
    z-index: 50;
    overflow: hidden;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-decoration svg {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: var(--font-size-sm);
    padding: 10px 20px;
    border-radius: 0;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--color-primary);
    color: #000000;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #000000;
}

.btn-accent {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.btn-accent:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-text-muted);
}

.btn-outline-light {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline-light:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 14px 28px;
    font-size: var(--font-size-base);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Section Titles ---------- */
.section-title {
    font-family: var(--font-display);
    font-size: var(--font-size-3xl);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-4);
    color: var(--color-text);
    letter-spacing: -0.03em;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    text-align: center;
    max-width: 520px;
    margin: 0 auto var(--space-16);
    line-height: 1.6;
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    color: var(--color-text);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 16px;
    height: 16px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---------- Language Switcher ---------- */
.language-switcher {
    position: relative;
}

.language-switcher-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    color: var(--color-text-muted);
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}

.language-switcher-toggle:hover {
    color: var(--color-text);
}

.language-switcher-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    min-width: 120px;
    padding: var(--space-1) 0;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
}

.language-switcher.is-open .language-switcher-menu {
    display: block;
}

.language-switcher.is-open .language-switcher-toggle {
    color: var(--color-text);
}

.language-switcher-menu li {
    list-style: none;
}

.language-switcher-menu li a {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.language-switcher-menu li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
}

.language-switcher-menu li.current-lang a {
    color: var(--color-primary);
    font-weight: 600;
}

/* ---------- Mobile Header Bar ---------- */
.mobile-header {
    display: none;
}

.mobile-theme-toggle {
    margin-left: auto;
}

.mobile-header-logo {
    color: var(--color-text);
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: 1;
}

.mobile-header-logo .logo-name {
    font-family: var(--font-display);
}

.mobile-header-logo .logo-name strong {
    color: var(--color-primary);
}

/* ---------- Mobile Menu Toggle ---------- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Hamburger → X animation */
.mobile-menu-toggle.is-open .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.mobile-menu-toggle.is-open .hamburger span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.is-open .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Sidebar close button (hidden by default, shown on mobile inner pages) */
.sidebar-close {
    display: none;
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 2;
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.sidebar-close:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile overlay (between content and drawer) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 55;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.is-visible {
    display: block;
    opacity: 1;
}

/* ---------- WooCommerce Overrides ---------- */
/* Classic WooCommerce templates */
.woocommerce-checkout .product-thumbnail,
.woocommerce-cart .product-thumbnail,
.woocommerce-checkout-review-order-table th.product-thumbnail,
.woocommerce-checkout-review-order-table td.product-thumbnail,
.woocommerce-cart-form th.product-thumbnail,
.woocommerce-cart-form td.product-thumbnail {
    display: none !important;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-bg-dark);
    color: var(--color-text-muted);
    padding: var(--space-16) 0 var(--space-8);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-logo .logo-name {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    font-weight: 700;
}

.footer-logo .logo-name strong {
    color: var(--color-primary);
}

.footer-description {
    margin-top: var(--space-4);
    font-size: var(--font-size-sm);
    line-height: 1.7;
    color: var(--color-text-muted);
}

.footer-col .widget-title {
    color: var(--color-text);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-6);
}

.footer-links li {
    margin-bottom: var(--space-3);
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-8);
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* Minimal footer for homepage */
.site-footer-minimal {
    background: transparent;
    padding: var(--space-6) 0;
    border-top: 1px solid var(--color-border);
}

.site-footer-minimal .footer-minimal-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.site-footer-minimal .footer-minimal-links {
    display: flex;
    gap: var(--space-6);
}

.site-footer-minimal .footer-minimal-links a {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    transition: color var(--transition-fast);
}

.site-footer-minimal .footer-minimal-links a:hover {
    color: var(--color-primary);
}

/* ---------- Blog Cards ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.blog-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-base);
}

.blog-card:hover {
    border-color: var(--color-text-muted);
}

.blog-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card-content {
    padding: var(--space-5);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.blog-card-category {
    background: transparent;
    color: var(--color-primary);
    padding: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-content h2,
.blog-card-content h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-2);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.blog-card-content h2 a,
.blog-card-content h3 a {
    color: var(--color-text);
}

.blog-card-content h2 a:hover,
.blog-card-content h3 a:hover {
    color: var(--color-primary);
}

.blog-card-content p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.blog-more {
    text-align: center;
    margin-top: var(--space-12);
}

.blog-preview-section {
    padding: var(--space-24) 0;
    background: var(--color-bg-alt);
}

/* ---------- Blog Page ---------- */
.blog-page {
    padding: var(--space-16) 0 var(--space-24);
}

.blog-page-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.blog-page-header h1 {
    font-family: var(--font-display);
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin-bottom: var(--space-3);
}

.blog-page-header p {
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
}

.blog-pagination {
    margin-top: var(--space-12);
    text-align: center;
}

.blog-empty {
    text-align: center;
    padding: var(--space-12);
    color: var(--color-text-muted);
}

.read-more {
    display: inline-block;
    margin-top: var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
}

.read-more:hover {
    color: var(--color-primary-dark);
}

/* ---------- Single Post ---------- */
.single-post {
    padding: var(--space-16) 0 var(--space-24);
}

.post-header {
    margin-bottom: var(--space-8);
}

.post-header h1 {
    font-family: var(--font-display);
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    letter-spacing: -0.03em;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.post-category {
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-excerpt {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    line-height: 1.6;
}

.post-featured-image {
    margin-bottom: var(--space-8);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.post-content {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--color-text-light);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--color-text);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
}

.post-content p {
    margin-bottom: var(--space-4);
}

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--color-primary-dark);
}

.post-content img {
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
}

.post-content ul,
.post-content ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.post-content li {
    margin-bottom: var(--space-2);
}

.post-content ul li {
    list-style: disc;
}

.post-content ol li {
    list-style: decimal;
}

.post-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-6);
    margin: var(--space-6) 0;
    font-style: italic;
    color: var(--color-text-light);
}

.post-content code {
    background: var(--color-bg-alt);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
}

.post-content pre {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    overflow-x: auto;
    margin: var(--space-6) 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-footer {
    margin-top: var(--space-10);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.post-tags .tag {
    padding: var(--space-1) var(--space-3);
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
}

.post-tags .tag:hover {
    color: var(--color-primary);
}

.post-share {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.post-share a {
    color: var(--color-primary);
    font-weight: 600;
}

.post-cta-box {
    margin-top: var(--space-12);
    padding: var(--space-8);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
}

.post-cta-box h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-3);
}

.post-cta-box p {
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
}

.related-posts {
    margin-top: var(--space-16);
}

.related-posts h2 {
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-6);
}

/* ---------- Page Content ---------- */
.page-content {
    padding: var(--space-16) 0 var(--space-24);
}

.page-header {
    margin-bottom: var(--space-8);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: var(--font-size-3xl);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.entry-content {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--color-text-light);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--color-text);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
}

.entry-content p {
    margin-bottom: var(--space-4);
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content ul,
.entry-content ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.entry-content li {
    margin-bottom: var(--space-2);
}

.entry-content ul li {
    list-style: disc;
}

.entry-content ol li {
    list-style: decimal;
}

/* ---------- Homepage Changelog Articles ---------- */
.homepage-articles {
    padding: var(--space-20) 0;
}

.changelog-entry {
    padding: 0 var(--space-8);
    margin-bottom: var(--space-20);
}

.changelog-entry:last-child {
    margin-bottom: 0;
}

.entry-date-header {
    margin-bottom: var(--space-6);
}

.entry-date-header time {
    font-family: var(--font-display);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: -0.01em;
}

.entry-body {}

.entry-image {
    margin-bottom: var(--space-6);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.entry-image img {
    width: 100%;
    height: auto;
}

.entry-title {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.entry-title-hero {
    font-size: var(--font-size-3xl);
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: var(--space-6);
}

.entry-text-hero {
    font-size: var(--font-size-lg);
    line-height: 1.6;
    color: var(--color-text-light);
}

.entry-title a {
    color: var(--color-text);
}

.entry-title a:hover {
    color: var(--color-primary);
}

.entry-excerpt,
.entry-text {
    font-size: var(--font-size-sm);
    line-height: 1.5rem;
    color: var(--color-text-light);
}

.entry-excerpt p {
    margin: 0;
}

.entry-read-more {
    display: inline-block;
    margin-top: var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
}

.entry-read-more:hover {
    color: var(--color-primary-dark);
}

/* Analyzer widget in main content (results area) */
.analyzer-widget-main {
    padding: var(--space-8) var(--space-8) 0;
}

/* ---------- Glow: dual rects for desktop/mobile ---------- */
.glow-desktop { display: block; }
.glow-mobile  { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
    }

    .site-layout {
        flex-direction: column;
    }

    /* === HOMEPAGE on mobile: sidebar stacks on top (full content visible) === */
    .is-homepage .site-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .is-homepage .sidebar-inner {
        width: auto;
        max-width: 32rem;
        margin: 0 auto;
        padding: 0 var(--space-6);
    }

    .is-homepage .sidebar-top {
        justify-content: flex-start;
        padding: var(--space-16) 0 var(--space-12);
    }

    .is-homepage .sidebar-bottom {
        align-items: center;
        padding-bottom: var(--space-4);
    }

    .is-homepage .sidebar-footer {
        justify-content: center;
    }

    /* Hide mobile header bar on homepage */
    .is-homepage .mobile-header {
        display: none !important;
    }

    /* === INNER PAGES on mobile: slide-in drawer === */

    /* Top bar with hamburger + logo */
    body:not(.is-homepage) .mobile-header {
        display: flex;
        align-items: center;
        gap: var(--space-3);
        padding: var(--space-3) var(--space-4);
        background: var(--color-bg-dark);
        border-bottom: 1px solid var(--color-border);
        position: sticky;
        top: 0;
        z-index: 50;
    }

    body:not(.is-homepage) .mobile-menu-toggle {
        display: flex;
    }

    /* Drawer panel */
    body:not(.is-homepage) .site-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 80vw;
        max-width: 18rem;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 60;
        overflow-y: auto;
    }

    body:not(.is-homepage) .site-sidebar.is-open {
        transform: translateX(0);
    }

    /* Show X close button inside drawer */
    body:not(.is-homepage) .sidebar-close {
        display: block;
    }

    /* Reset sidebar-inner for drawer width */
    body:not(.is-homepage) .sidebar-inner {
        width: 100%;
        padding: var(--space-6) var(--space-6) var(--space-4);
    }

    /* Sidebar top: no flex-grow, align to top */
    body:not(.is-homepage) .sidebar-top {
        flex: 0 0 auto;
        justify-content: flex-start;
        padding: 0;
    }

    /* Reduce logo bottom margin in drawer */
    body:not(.is-homepage) .sidebar-logo {
        margin-bottom: var(--space-6);
    }

    /* Nav links: slightly larger for touch */
    body:not(.is-homepage) .sidebar-nav .nav-menu {
        gap: var(--space-1);
    }

    body:not(.is-homepage) .sidebar-nav .nav-menu li a {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-size-base);
    }

    /* Footer area */
    body:not(.is-homepage) .sidebar-bottom {
        padding-top: var(--space-8);
        padding-bottom: var(--space-4);
    }

    /* === Shared mobile styles === */

    /* Glow SVG: bottom-up on mobile */
    .sidebar-glow svg {
        top: auto;
        right: auto;
        bottom: -12rem;
        left: -40%;
        width: 180%;
        height: 80rem;
    }

    /* Swap gradient rects */
    .glow-desktop { display: none; }
    .glow-mobile  { display: block; }

    /* Divider: horizontal bottom line on mobile */
    .sidebar-divider {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
    }

    /* Hide timeline decoration on mobile */
    .timeline-decoration {
        display: none;
    }

    /* Main content: no offset */
    .main-content {
        margin-left: 0;
    }

    .site-main {
        padding-top: 0;
    }

    /* Theme toggle stays top-right */
    .theme-toggle-float {
        right: var(--space-4);
        top: var(--space-4);
    }

    /* On inner pages, hide floating toggle (it's in the mobile header bar) */
    body:not(.is-homepage) .theme-toggle-float {
        display: none;
    }

    /* WP admin bar offset (46px on mobile ≤782px, 32px on >782px) */
    .admin-bar .mobile-header {
        top: 46px;
    }

    .admin-bar:not(.is-homepage) .site-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }

    .admin-bar .sidebar-overlay {
        top: 46px;
    }

    .admin-bar .theme-toggle-float {
        top: calc(var(--space-4) + 46px);
    }

    /* Changelog entries: tighter padding */
    .changelog-entry {
        padding: 0 var(--space-4);
    }

    /* Sidebar intro: slightly smaller h1 on mobile */
    .sidebar-intro h1 {
        font-size: var(--font-size-3xl);
    }

    .sidebar-intro {
        margin-top: var(--space-8);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .post-header h1 {
        font-size: var(--font-size-2xl);
    }
}

/* ---------- Light Theme Override ---------- */
[data-theme="light"] {
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f5;
    --color-bg-dark: #e5e5e5;
    --color-bg-card: #ffffff;
    --color-border: #d4d4d4;
    --color-text: #000000;
    --color-text-light: #525252;
    --color-text-muted: #737373;
    --color-primary: #a3c800;
    --color-primary-dark: #8fb300;
    --color-primary-light: #d4ff00;
}

[data-theme="light"] .mobile-header {
    background: #e5e5e5;
    border-bottom-color: #d4d4d4;
}

[data-theme="light"] .sidebar-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .site-sidebar {
    background: #e5e5e5;
}

[data-theme="light"] .sidebar-glow {
    background: #e5e5e5;
}

[data-theme="light"] .sidebar-intro h1 {
    color: #000000;
}

[data-theme="light"] .sidebar-intro h1 .text-accent {
    color: #8fb300;
}

[data-theme="light"] .sidebar-intro p {
    color: #525252;
}

[data-theme="light"] .sidebar-nav .nav-menu li a:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .language-switcher-menu li a:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Form container: light theme */
[data-theme="light"] .sidebar-form {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .sidebar-form:focus-within {
    box-shadow:
        inset 0 0 0 1px var(--color-primary),
        0 0 0 4px rgba(163, 200, 0, 0.1);
}

[data-theme="light"] .sidebar-form-group .sidebar-input-wrap {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sidebar-submit {
    color: var(--color-text);
}

[data-theme="light"] .sidebar-submit::before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.8));
    opacity: 0.08;
}

[data-theme="light"] .sidebar-submit:hover::before {
    opacity: 0.12;
}

[data-theme="light"] .sidebar-icon-link:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

/* ---------- Come Funziona: Modules Grid ---------- */
.cf-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.cf-module-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-base);
}

.cf-module-card:hover {
    border-color: var(--color-primary);
}

.cf-module-icon {
    color: var(--color-primary);
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cf-module-name {
    font-size: var(--font-size-sm);
    display: block;
    margin-bottom: 2px;
}

.cf-module-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ---------- Come Funziona: Report Comparison ---------- */
.cf-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.cf-plan {
    padding: var(--space-6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-bg-card);
    position: relative;
}

.cf-plan-full {
    border-color: var(--color-primary);
}

.cf-plan-badge {
    position: absolute;
    top: calc(-1 * var(--space-2));
    right: var(--space-4);
    background: var(--color-primary);
    color: #0a0a0a;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.cf-plan-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.cf-plan-header h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.cf-plan-price {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.cf-plan-free .cf-plan-price {
    color: var(--color-primary);
}

.cf-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cf-plan-features li {
    position: relative;
    padding: var(--space-2) 0 var(--space-2) var(--space-5);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.5;
}

.cf-plan-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
}

/* ---------- Changelog Pagination ---------- */
.changelog-pagination {
    padding: var(--space-8) var(--space-8) 0;
}

@media (max-width: 1024px) {
    .cf-modules-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cf-comparison {
        grid-template-columns: 1fr;
    }
}

/* ---------- Come Funziona: Hero stats ---------- */
.cf-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding: 0;
    list-style: none;
}

.cf-stat {
    padding: var(--space-4);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.cf-stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cf-stat-label {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Come Funziona: Why grid ---------- */
.cf-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.cf-why-card {
    padding: var(--space-5);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-base);
}

.cf-why-card:hover {
    border-color: var(--color-primary);
}

.cf-why-title {
    font-family: var(--font-display);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
    line-height: 1.3;
}

.cf-why-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---------- Come Funziona: FAQ accordion ---------- */
.cf-faq {
    margin-top: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.cf-faq-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-base);
}

.cf-faq-item[open] {
    border-color: var(--color-primary);
}

.cf-faq-q {
    cursor: pointer;
    list-style: none;
    padding: var(--space-4) var(--space-5);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.cf-faq-q::-webkit-details-marker { display: none; }

.cf-faq-q::after {
    content: '+';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    transition: transform var(--transition-base), background var(--transition-base);
}

.cf-faq-item[open] > .cf-faq-q::after {
    transform: rotate(45deg);
    background: var(--color-primary);
    color: #0a0a0a;
}

.cf-faq-a {
    padding: 0 var(--space-5) var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .cf-stats,
    .cf-why-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   WooCommerce Blocks Checkout — minimal dark theme (rewritten 2026-05-08)
   Single card per section, generous whitespace, no aggressive contrast.
   ============================================================ */

/* ---------- Page wrapper / heading ---------- */
.woocommerce-checkout .page-header h1,
.woocommerce-cart .page-header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
    color: #ffffff;
}

/* ---------- Layout: SINGLE COLUMN ---------- */
.wc-block-components-sidebar-layout.wc-block-checkout {
    display: flex;
    flex-direction: column;
    max-width: 560px;
    margin: 0 auto;
    gap: 0;
}

.wc-block-components-main { min-width: 0; width: 100%; }

/* Order summary goes after the form (place sidebar AT THE END of the column) */
.wc-block-components-sidebar.wc-block-checkout__sidebar {
    position: static;
    width: 100%;
    margin-top: 16px;
    order: 2;
}

/* Hide the duplicated inline summary inside actions block */
.checkout-order-summary-block-fill-wrapper { display: none !important; }

/* ---------- Sections (fieldsets): minimal — no card, only top border divider ---------- */
.wc-block-components-checkout-step {
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 24px 0;
    margin: 0;
}

.wc-block-components-checkout-step:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.wc-block-components-checkout-step__heading {
    margin: 0 0 16px;
}

.wc-block-components-checkout-step__title {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wc-block-components-checkout-step__content { margin: 0; }

/* ---------- Form layout: address fields in 2-col grid ---------- */
.wc-block-components-address-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px 20px;  /* row-gap 36px between rows, col-gap 20px between half-fields */
}

.wc-block-components-address-form > .wc-block-components-text-input,
.wc-block-components-address-form > .wc-blocks-components-select,
.wc-block-components-address-form > .wc-block-components-address-form__country,
.wc-block-components-address-form > .wc-block-components-address-form__address_1,
.wc-block-components-address-form > .wc-block-components-address-form__address_2,
.wc-block-components-address-form > .wc-block-components-address-form__phone,
.wc-block-components-address-form__address_2-toggle {
    grid-column: 1 / -1;
}

/* Email field: full width */
#contact .wc-block-components-text-input { grid-column: 1 / -1; }

/* ---------- Form fields: input, select, textarea ---------- */
.wc-block-components-text-input,
.wc-blocks-components-select,
.wc-block-components-address-form__state,
.wc-block-components-address-form__country {
    position: relative;
    margin: 0 !important;
}

.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-blocks-components-select select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: color 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.wc-block-components-text-input textarea { resize: vertical; }

.wc-block-components-text-input input:hover,
.wc-block-components-text-input textarea:hover,
.wc-blocks-components-select select:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.wc-block-components-text-input input:focus,
.wc-block-components-text-input textarea:focus,
.wc-blocks-components-select select:focus {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
    box-shadow: none;
}

.wc-block-components-text-input input::placeholder,
.wc-block-components-text-input textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Chrome / Edge autofill — pure black bg + gray/white text */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #000000 inset !important;
    box-shadow: 0 0 0 1000px #000000 inset !important;
    caret-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s !important;
    border-radius: 0 !important;
}

/* ---------- Labels: ALWAYS sopra il campo (no overlap) ---------- */
.wc-block-components-text-input,
.wc-blocks-components-select,
.wc-block-components-address-form__state,
.wc-block-components-address-form__country {
    padding-top: 22px;  /* spazio per la label sopra */
}

.wc-block-components-text-input label,
.wc-blocks-components-select__label {
    position: absolute;
    left: 0;
    top: 0;
    transform: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    background: transparent;
    padding: 0;
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    line-height: 1.4;
    z-index: 1;
}

/* Reset padding-top extra dell'input — la label è fuori, l'input è normale */
.wc-block-components-text-input input,
.wc-blocks-components-select select {
    padding: 0 14px !important;
    line-height: 50px !important;
    height: 52px !important;
}

.wc-block-components-text-input textarea {
    padding: 14px !important;
    height: auto !important;
    min-height: 96px;
    line-height: 1.4;
}

/* Select needs space for caret */
.wc-blocks-components-select select {
    padding-right: 40px !important;
}

/* Select dropdown caret */
.wc-blocks-components-select__expand {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    fill: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.wc-blocks-components-select select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* ---------- Address card (saved address summary at top of billing) ---------- */
.wc-block-components-address-card-wrapper {
    margin-bottom: 14px;
}

.wc-block-components-address-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
}

.wc-block-components-address-card address {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-style: normal;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
}

.wc-block-components-address-card__edit {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.wc-block-components-address-card__edit:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

/* "+ Add apartment" toggle */
.wc-block-components-address-form__address_2-toggle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.wc-block-components-address-form__address_2-toggle:hover { color: #ffffff; }

/* ---------- Checkboxes (terms, order notes) ---------- */
.wc-block-components-checkbox {
    display: flex;
    align-items: flex-start;
    margin: 0;
}

.wc-block-components-checkbox > label {
    position: relative;       /* anchor for absolute SVG mark */
    display: flex;
    align-items: center;       /* vertically center box with text */
    gap: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.5;
    padding: 4px 0;
    user-select: none;
}

/* The native input is the visible box */
.wc-block-components-checkbox__input {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0 !important;
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 3px !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.wc-block-components-checkbox__input:hover {
    border-color: rgba(255, 255, 255, 0.45) !important;
}

.wc-block-components-checkbox__input:checked {
    background: #ffffff !important;
    border-color: #ffffff !important;
}

/* SVG mark: positioned over the input (which is the first flex child of label) */
.wc-block-components-checkbox__mark {
    position: absolute !important;
    left: 3px;                /* input is 18px, mark 12px → (18-12)/2 = 3px from left */
    top: 50%;
    transform: translateY(-50%);
    width: 12px !important;
    height: 12px !important;
    fill: #0a0a0a !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.wc-block-components-checkbox__input:checked ~ .wc-block-components-checkbox__mark,
.wc-block-components-checkbox__input:checked + .wc-block-components-checkbox__mark {
    opacity: 1;
}

.wc-block-components-checkbox__label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.wc-block-components-checkbox__label a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

.wc-block-components-checkbox__label a:hover { text-decoration-color: rgba(255, 255, 255, 0.7); }

/* ---------- Terms block ---------- */
.wc-block-checkout__terms {
    background: transparent;
    border: 0;
    padding: 16px 24px;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    line-height: 1.6;
}

.wc-block-checkout__terms a {
    color: rgba(255, 255, 255, 0.95);
}

/* ---------- Notices ---------- */
.wc-block-components-notice-banner {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 14px 16px !important;
}

.wc-block-components-notice-banner.is-error {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
}

.wc-block-components-notice-banner.is-error svg {
    fill: #ef4444 !important;
}

.wc-block-components-notice-banner.is-success {
    background: rgba(163, 200, 0, 0.06) !important;
    border-color: rgba(163, 200, 0, 0.2) !important;
}

.wc-block-components-notice-banner__content {
    color: inherit !important;
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Order Summary (minimal, no card, just dividers) ---------- */
.wp-block-woocommerce-checkout-totals-block,
.wp-block-woocommerce-checkout-order-summary-block {
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding-top: 24px;
}

/* Reset nested wrappers */
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper,
.wp-block-woocommerce-checkout-order-summary-cart-items-block,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block,
.wp-block-woocommerce-checkout-order-summary-totals-block,
.wp-block-woocommerce-checkout-order-summary-subtotal-block,
.wp-block-woocommerce-checkout-order-summary-discount-block,
.wp-block-woocommerce-checkout-order-summary-fee-block {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wc-block-components-checkout-order-summary__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 16px;
    border-bottom: 0;
    cursor: default;
}

.wc-block-components-checkout-order-summary__title-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.wc-block-components-checkout-order-summary__title-price {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-left: auto;
}

.wc-block-components-checkout-order-summary__title-icon svg {
    fill: rgba(255, 255, 255, 0.5);
}

@media (min-width: 901px) {
    .wc-block-components-checkout-order-summary__title { pointer-events: none; }
    .wc-block-components-checkout-order-summary__title-icon { display: none; }
}

/* Cart items section */
.wp-block-woocommerce-checkout-order-summary-cart-items-block {
    padding: 14px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.wc-block-components-order-summary__content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wc-block-components-order-summary-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: start;
}

.wc-block-components-order-summary-item__image {
    position: relative;
    width: 48px;
    height: 48px;
}

.wc-block-components-order-summary-item__image img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    object-fit: cover;
}

.wc-block-components-order-summary-item__quantity {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    line-height: 16px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1.5px solid #0a0a0a;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.wc-block-components-order-summary-item__description {
    min-width: 0;
}

.wc-block-components-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 3px;
    line-height: 1.35;
}

.wc-block-components-product-metadata__description p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wc-block-cart-item__prices { display: none; } /* main price shown on right */

.wc-block-components-order-summary-item__total-price {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    text-align: right;
    align-self: start;
    padding-top: 1px;
}

/* Coupon section */
.wp-block-woocommerce-checkout-order-summary-coupon-form-block {
    padding: 14px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.wc-block-components-totals-coupon .wc-block-components-panel__button {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.65) !important;
    padding: 0 !important;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.wc-block-components-totals-coupon .wc-block-components-panel__button:hover { color: #ffffff !important; }

.wc-block-components-panel__button-icon { fill: currentColor !important; }

.wc-block-components-totals-coupon__form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.wc-block-components-totals-coupon__form input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    color: #ffffff;
    font-size: 13px;
}

/* Totals (subtotal, discount, fees, total) */
.wp-block-woocommerce-checkout-order-summary-totals-block {
    padding: 16px 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wc-block-components-totals-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.wc-block-components-totals-item__label {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

.wc-block-components-totals-item__value,
.wc-block-formatted-money-amount {
    color: #ffffff;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.wc-block-components-totals-footer-item {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.wc-block-components-totals-footer-item .wc-block-formatted-money-amount,
.wc-block-components-totals-footer-item-tax-value {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

/* Hide empty rows */
.wp-block-woocommerce-checkout-order-summary-discount-block:empty,
.wp-block-woocommerce-checkout-order-summary-fee-block:empty {
    display: none;
}

/* ---------- Place Order CTA ---------- */
.wc-block-checkout__actions {
    margin-top: 24px;
}

.wc-block-checkout__actions_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0;
    flex-wrap: wrap;
}

.wc-block-components-checkout-place-order-button,
.wc-block-components-button.contained {
    background: var(--color-primary, #d4ff00);
    color: #0a0a0a;
    border: 0;
    border-radius: 0;
    padding: 0 28px;
    height: 52px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    margin-left: auto;
    min-width: 180px;
}

.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button.contained:hover {
    background: var(--color-primary-dark, #bfe600);
}

.wc-block-components-checkout-place-order-button:active {
    transform: translateY(1px);
}

.wc-block-components-checkout-return-to-cart-button {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.wc-block-components-checkout-return-to-cart-button:hover { color: #ffffff; }
.wc-block-components-checkout-return-to-cart-button svg { fill: currentColor; width: 18px; height: 18px; }

/* Empty payment methods notice — neutral box, not error */
.wc-block-checkout__no-payment-methods-notice {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}
.wc-block-checkout__no-payment-methods-notice svg { fill: rgba(255, 255, 255, 0.5) !important; }

/* ---------- Mobile responsive ---------- */
@media (max-width: 600px) {
    .wc-block-components-address-form { grid-template-columns: 1fr; }
    .wc-block-components-checkout-step { padding: 18px; }
    .wc-block-components-text-input input,
    .wc-block-components-text-input textarea,
    .wc-blocks-components-select select { font-size: 16px; } /* prevent iOS zoom */

    .wc-block-checkout__actions_row {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .wc-block-components-checkout-place-order-button { width: 100%; margin: 0; }
    .wc-block-components-checkout-return-to-cart-button { justify-content: center; }
}

/* ============================================================
   Checkout fields — final override to beat WC Blocks core CSS
   ============================================================ */

/* All form-field containers */
body .wc-block-components-text-input,
body .wc-blocks-components-select,
body .wc-blocks-components-select__container,
body .wc-block-components-address-form__country,
body .wc-block-components-address-form__state {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Force black bg + gray text on every input/select/textarea */
body .wc-block-checkout input[type="text"],
body .wc-block-checkout input[type="email"],
body .wc-block-checkout input[type="tel"],
body .wc-block-checkout input[type="number"],
body .wc-block-checkout textarea,
body .wc-block-checkout select,
body .wc-block-cart input[type="text"],
body .wc-block-cart select,
body .wp-block-woocommerce-checkout input,
body .wp-block-woocommerce-checkout textarea,
body .wp-block-woocommerce-checkout select {
    background-color: #000000 !important;
    background-image: none !important;
    color: #c0c0c0 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-text-fill-color: #c0c0c0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    height: 52px !important;
    line-height: 50px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: color 0.15s ease, border-color 0.15s ease !important;
}

body .wp-block-woocommerce-checkout textarea {
    height: auto !important;
    min-height: 96px !important;
    padding: 14px !important;
    line-height: 1.4 !important;
}

body .wc-block-checkout select { padding-right: 40px !important; }

/* Hover / focus */
body .wp-block-woocommerce-checkout input:hover,
body .wp-block-woocommerce-checkout textarea:hover,
body .wp-block-woocommerce-checkout select:hover,
body .wp-block-woocommerce-checkout input:focus,
body .wp-block-woocommerce-checkout textarea:focus,
body .wp-block-woocommerce-checkout select:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    outline: none !important;
}

/* Autofill — forces black bg + light text */
body .wp-block-woocommerce-checkout input:-webkit-autofill,
body .wp-block-woocommerce-checkout input:-webkit-autofill:hover,
body .wp-block-woocommerce-checkout input:-webkit-autofill:focus,
body .wp-block-woocommerce-checkout input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #000000 inset !important;
    box-shadow: 0 0 0 1000px #000000 inset !important;
    caret-color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transition: background-color 5000s ease-in-out 0s !important;
    border-radius: 0 !important;
}

/* Placeholder gray */
body .wp-block-woocommerce-checkout input::placeholder,
body .wp-block-woocommerce-checkout textarea::placeholder {
    color: rgba(255, 255, 255, 0.25) !important;
    opacity: 1 !important;
}

/* ============================================================
   Labels above field — applied ONLY to the outer wrapper
   to align text inputs and selects identically (52px field + 22px label)
   ============================================================ */

/* Reset any padding-top on inner select container (avoid double offset) */
body .wc-blocks-components-select__container {
    position: static !important;
    padding-top: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* Outer wrappers: same layout for text-input and select */
body .wc-block-components-text-input,
body .wc-blocks-components-select {
    position: relative !important;
    padding-top: 22px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Don't add padding-top to the address-form__country / __state since
   they wrap a .wc-blocks-components-select that already has it */
body .wc-block-components-address-form__country,
body .wc-block-components-address-form__state {
    padding-top: 0 !important;
    margin: 0 !important;
}

/* Labels: always at top:0 of outer wrapper, uppercase small */
body .wc-block-components-text-input > label,
body .wc-blocks-components-select .wc-blocks-components-select__label,
body .wc-blocks-components-select__label {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    height: 18px !important;
    z-index: 2 !important;
    pointer-events: none !important;
    display: block !important;
}

/* Select option dropdown list (some browsers honor this) */
body .wp-block-woocommerce-checkout select option {
    background: #1a1a2e !important;
    color: #ffffff !important;
}

/* Caret select — aligned to vertical center of the SELECT (not the wrapper) */
body .wc-blocks-components-select__expand {
    fill: rgba(255, 255, 255, 0.5) !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    bottom: auto !important;
    margin-top: 11px !important;  /* offset by half of label-area height (22px / 2) */
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    width: 18px !important;
    height: 18px !important;
}

/* Force grid + gap on address form (override WC core CSS) */
body .wc-block-components-address-form,
body #billing.wc-block-components-address-form,
body #shipping.wc-block-components-address-form,
body #contact.wc-block-components-address-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px 14px !important;
    row-gap: 20px !important;
    column-gap: 14px !important;
}

@media (max-width: 600px) {
    body .wc-block-components-address-form {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
}

/* Order notes section: full width container + clickable area */
body .wc-block-checkout__order-notes,
body .wc-block-checkout__add-note,
body .wc-block-checkout__add-note .wc-block-components-checkbox {
    width: 100% !important;
    max-width: 100% !important;
}

body .wc-block-checkout__add-note .wc-block-components-checkbox > label {
    display: flex !important;
    width: 100% !important;
}

/* Order notes textarea (appears when checkbox checked) full width */
body .wc-block-checkout__order-notes textarea,
body .wc-block-checkout__order-notes .wc-block-components-textarea {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 14px !important;
}

/* ============================================================
   Cart page — coupon panel + hide product image
   ============================================================ */

/* Hide cart item image entirely */
body .wc-block-cart-item__image,
body td.wc-block-cart-item__image {
    display: none !important;
}

/* Coupon panel — both cart and checkout sidebar share these classes */
body .wc-block-components-totals-coupon__content {
    margin-top: 12px;
}

body .wc-block-components-totals-coupon__form {
    display: flex !important;
    gap: 8px !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
}

body .wc-block-components-totals-coupon__form .wc-block-components-text-input {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 0 !important;  /* no floating-label space here, it's a single inline input */
    margin: 0 !important;
}

/* Override the floating label rule for coupon input — keep label hidden visually since the
   "Enter code" placeholder is enough */
body .wc-block-components-totals-coupon__form .wc-block-components-text-input > label {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: rgba(255, 255, 255, 0.35) !important;
    transition: opacity 0.15s ease !important;
}

/* Hide label when input is focused or filled */
body .wc-block-components-totals-coupon__form .wc-block-components-text-input.is-active > label,
body .wc-block-components-totals-coupon__form .wc-block-components-text-input input:focus + label,
body .wc-block-components-totals-coupon__form .wc-block-components-text-input input:not(:placeholder-shown) + label {
    opacity: 0 !important;
}

body .wc-block-components-totals-coupon__form input {
    height: 44px !important;
    line-height: 44px !important;
    padding: 0 14px !important;
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0 !important;
    font-size: 13px !important;
}

body .wc-block-components-totals-coupon__button,
body .wc-block-components-totals-coupon__form button {
    flex: 0 0 auto;
    height: 44px !important;
    padding: 0 18px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    cursor: pointer !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
    min-width: auto !important;
}

body .wc-block-components-totals-coupon__button:hover:not([disabled]),
body .wc-block-components-totals-coupon__form button:hover:not([disabled]) {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

body .wc-block-components-totals-coupon__button[disabled],
body .wc-block-components-totals-coupon__form button[disabled] {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

/* Coupon panel header (Add coupons toggle) */
body .wc-block-components-panel__button {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background: transparent !important;
    padding: 4px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    width: 100%;
    text-align: left;
}

body .wc-block-components-panel__button:hover { color: #ffffff !important; }

body .wc-block-components-panel__button-icon {
    fill: currentColor !important;
    width: 16px !important;
    height: 16px !important;
}

/* Cart: hide right-most "Total per row" cell (price already shown next to product) */
body td.wc-block-cart-item__total,
body .wc-block-cart-item__total {
    display: none !important;
}

/* Cart: collapse the image cell entirely (display:none doesn't always collapse table-cells) */
body td.wc-block-cart-item__image,
body .wc-block-cart-item__image {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    visibility: hidden !important;
}

/* Ensure product cell takes the freed space */
body td.wc-block-cart-item__product,
body .wc-block-cart-item__product {
    padding-left: 0 !important;
    width: auto !important;
}

/* ============================================================
   Empty cart page
   ============================================================ */

body .wp-block-woocommerce-empty-cart-block {
    text-align: center;
    padding: 32px 0;
}

body .wc-block-cart__empty-cart__title {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 auto 24px !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
}

/* Hide the empty-cart icon image (just a placeholder) */
body .with-empty-cart-icon::before {
    display: none !important;
}

/* Separator (dots) */
body .wp-block-separator.is-style-dots {
    border: 0 !important;
    margin: 36px auto !important;
    color: rgba(255, 255, 255, 0.25) !important;
    text-align: center;
    font-size: 14px;
    letter-spacing: 1em;
}

/* "New in store" heading */
body .wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    margin: 0 auto 24px !important;
}

/* Reset parent grid wrapper that WC adds */
body .wp-block-woocommerce-product-new,
body .wc-block-grid {
    max-width: 100% !important;
    width: 100% !important;
}

/* Product grid: max 3 cols on wide screens */
body .wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 720px !important;
}

/* Single product: medium-large card centered */
body .wc-block-grid__products:has(> li:only-child) {
    grid-template-columns: minmax(0, 520px) !important;
    justify-content: center !important;
}

/* Card: flex column so all elements align consistently */
body li.wc-block-grid__product {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
    list-style: none !important;
    margin: 0 !important;
    gap: 0;
}

body .wc-block-grid__product:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

body .wc-block-grid__product-link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
    margin-bottom: 14px;
}

/* Image area — placeholder hidden, "PDF" label centered */
body .wc-block-grid__product-image {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 140px !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body .wc-block-grid__product-image img.woocommerce-placeholder,
body .wc-block-grid__product-image .woocommerce-placeholder {
    display: none !important;
}

body .wc-block-grid__product-image::before {
    content: "PDF";
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    color: rgba(163, 200, 0, 0.55);
    letter-spacing: 0.18em;
}

body .wc-block-grid__product-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    min-height: 2.8em;     /* keep cards same height even with title length variations */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body .wc-block-grid__product-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 16px !important;
    line-height: 1 !important;
}

body .wc-block-grid__product-price .woocommerce-Price-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

body .wc-block-grid__product-price .woocommerce-Price-currencySymbol {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

body .wc-block-grid__product-add-to-cart {
    margin: auto 0 0 !important;  /* push to bottom */
    padding: 0 !important;
}

body .wc-block-grid__product-add-to-cart .wp-block-button__link,
body .wc-block-grid__product-add-to-cart a.add_to_cart_button {
    display: block !important;
    background: var(--color-primary, #d4ff00) !important;
    color: #0a0a0a !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 16px !important;
    height: 42px !important;
    line-height: 42px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    text-decoration: none !important;
    transition: background 0.15s ease !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

body .wc-block-grid__product-add-to-cart .wp-block-button__link:hover,
body .wc-block-grid__product-add-to-cart a.add_to_cart_button:hover {
    background: var(--color-primary-dark, #bfe600) !important;
}

/* Mobile: 1-column grid */
@media (max-width: 600px) {
    body .wc-block-grid__products {
        grid-template-columns: 1fr !important;
    }
}

/* ===== Cart table: remove all leftover space from hidden image cell ===== */

/* Force the cart items table to auto-layout (not fixed) */
body table.wc-block-cart-items,
body .wp-block-woocommerce-cart-items-block,
body .wc-block-cart-items {
    table-layout: auto !important;
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    width: 100% !important;
}

/* Image cell completely collapsed (override any width set by WC core) */
body tr.wc-block-cart-items__row > td.wc-block-cart-item__image {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    visibility: collapse !important;
}

body tr.wc-block-cart-items__row > td.wc-block-cart-item__image > * {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
}

/* Product cell: start at the very left, no left padding */
body tr.wc-block-cart-items__row > td.wc-block-cart-item__product {
    padding-left: 0 !important;
    width: auto !important;
}

/* Override WC has-N-columns max-width constraints on product grid items */
body .wc-block-grid.has-1-columns .wc-block-grid__product,
body .wc-block-grid.has-2-columns .wc-block-grid__product,
body .wc-block-grid.has-3-columns .wc-block-grid__product,
body .wc-block-grid.has-4-columns .wc-block-grid__product,
body .wc-block-grid.has-5-columns .wc-block-grid__product,
body .wc-block-grid.has-6-columns .wc-block-grid__product,
body .theme-twentytwenty .wc-block-grid .wc-block-grid__product {
    flex: 0 1 auto !important;
    max-width: none !important;
    width: auto !important;
}

/* ===== Cart row: bypass table layout entirely (forces flex layout) ===== */

body .wc-block-cart-items,
body table.wc-block-cart-items,
body .wp-block-woocommerce-cart-items-block,
body .wp-block-woocommerce-cart-items-block table {
    display: block !important;
    width: 100% !important;
}

body .wc-block-cart-items > thead,
body .wc-block-cart-items > tbody,
body .wc-block-cart-items > tfoot {
    display: block !important;
    width: 100% !important;
}

body tr.wc-block-cart-items__row {
    display: flex !important;
    align-items: flex-start !important;
    width: 100% !important;
    padding: 16px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body tr.wc-block-cart-items__row > td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
}

body tr.wc-block-cart-items__row > td.wc-block-cart-item__image {
    display: none !important;
}

body tr.wc-block-cart-items__row > td.wc-block-cart-item__product {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
}

body tr.wc-block-cart-items__row > td.wc-block-cart-item__total {
    display: none !important;
}

body .wc-block-cart-item__wrap {
    padding: 0 !important;
    margin: 0 !important;
}

/* Cart item: move remove button to top-right of the row */
body tr.wc-block-cart-items__row {
    position: relative !important;
    padding-right: 40px !important;  /* leave room for the X button */
}

body .wc-block-cart-item__quantity {
    position: absolute !important;
    top: 16px !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

body .wc-block-cart-item__remove-link {
    background: transparent !important;
    border: 0 !important;
    padding: 4px !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.4) !important;
    transition: color 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
}

body .wc-block-cart-item__remove-link:hover {
    color: #ef4444 !important;
}

body .wc-block-cart-item__remove-link svg {
    fill: currentColor !important;
    width: 18px !important;
    height: 18px !important;
}

/* Disable order notes block in checkout */
body .wc-block-checkout__order-notes,
body .wp-block-woocommerce-checkout-order-note-block,
body #order-notes.wc-block-components-checkout-step {
    display: none !important;
}

/* Hide the dotted separator on empty cart page */
body .wp-block-woocommerce-empty-cart-block hr.wp-block-separator,
body .wp-block-separator.is-style-dots {
    display: none !important;
}

/* ===== Order summary in checkout: hide placeholder image + duplicate prices ===== */

/* Hide product image in order summary (same as cart) */
body .wc-block-components-order-summary-item__image {
    display: none !important;
}

/* The item description container — full width since image is gone */
body .wc-block-components-order-summary-item {
    grid-template-columns: 1fr auto !important;
    gap: 12px !important;
}

/* Hide duplicate "individual price" near the description (keep only total on right) */
body .wc-block-components-order-summary-item__individual-prices,
body .wc-block-cart-item__prices {
    display: none !important;
}

/* Compact the description block */
body .wc-block-components-order-summary-item__description {
    min-width: 0 !important;
    padding: 0 !important;
}

body .wc-block-components-order-summary-item__description .wc-block-components-product-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    margin: 0 0 4px !important;
    display: block !important;
}

body .wc-block-components-product-metadata {
    margin: 4px 0 0 !important;
}

body .wc-block-components-product-metadata__description p {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Right-aligned item total price */
body .wc-block-components-order-summary-item__total-price {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    align-self: start !important;
    text-align: right !important;
}

/* ===== Order summary: remove ALL internal borders, single lime line on top ===== */

body .wp-block-woocommerce-checkout-order-summary-block {
    border-top: 2px solid var(--color-primary, #d4ff00) !important;
    padding-top: 18px !important;
}

/* Wipe ALL borders from inner blocks */
body .wp-block-woocommerce-checkout-order-summary-block * {
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper,
body .wp-block-woocommerce-checkout-order-summary-cart-items-block,
body .wp-block-woocommerce-checkout-order-summary-coupon-form-block,
body .wp-block-woocommerce-checkout-order-summary-totals-block,
body .wp-block-woocommerce-checkout-order-summary-subtotal-block,
body .wc-block-components-checkout-order-summary__title,
body .wc-block-components-totals-footer-item {
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* ===== Legal pages: privacy / terms / cookie — minimal compact text ===== */

.page-id-3 .entry-content,    /* Privacy EN */
.page-id-19 .entry-content,   /* Privacy IT */
.page-id-13 .entry-content,   /* Terms EN */
.page-id-25 .entry-content,   /* Terms IT */
.page-id-14 .entry-content,   /* Cookie EN */
.page-id-27 .entry-content {  /* Cookie IT */
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    max-width: 640px;
    margin: 0 auto;
}

.page-id-3 .entry-content h2,
.page-id-19 .entry-content h2,
.page-id-13 .entry-content h2,
.page-id-25 .entry-content h2,
.page-id-14 .entry-content h2,
.page-id-27 .entry-content h2 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 28px 0 10px;
    letter-spacing: 0.01em;
}

.page-id-3 .entry-content p,
.page-id-19 .entry-content p,
.page-id-13 .entry-content p,
.page-id-25 .entry-content p,
.page-id-14 .entry-content p,
.page-id-27 .entry-content p {
    margin: 0 0 12px;
}

.page-id-3 .entry-content ul,
.page-id-19 .entry-content ul,
.page-id-13 .entry-content ul,
.page-id-25 .entry-content ul,
.page-id-14 .entry-content ul,
.page-id-27 .entry-content ul {
    margin: 0 0 12px 20px;
    padding: 0;
    list-style: disc;
}

.page-id-3 .entry-content ul li,
.page-id-19 .entry-content ul li,
.page-id-13 .entry-content ul li,
.page-id-25 .entry-content ul li,
.page-id-14 .entry-content ul li,
.page-id-27 .entry-content ul li {
    margin: 4px 0;
    padding-left: 4px;
}

.page-id-3 .entry-content em:first-child,
.page-id-19 .entry-content em:first-child,
.page-id-13 .entry-content em:first-child,
.page-id-25 .entry-content em:first-child {
    color: rgba(255, 255, 255, 0.5);
    font-style: normal;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-id-3 .entry-content a,
.page-id-19 .entry-content a,
.page-id-13 .entry-content a,
.page-id-25 .entry-content a,
.page-id-14 .entry-content a,
.page-id-27 .entry-content a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

.page-id-3 .entry-content a:hover,
.page-id-19 .entry-content a:hover,
.page-id-13 .entry-content a:hover,
.page-id-25 .entry-content a:hover {
    text-decoration-color: rgba(255, 255, 255, 0.7);
}
