/* ============================================
   NordicAstro — Dark Space Theme
   Modern, reactive, app-like design
   ============================================ */

/* ---------- Foundation ---------- */
:root {
    --na-bg-deepest: #060a10;
    --na-bg-dark: #0a0f18;
    --na-bg-card: #111827;
    --na-bg-card-hover: #1a2332;
    --na-bg-surface: #1e293b;
    --na-accent: #00B4D8;
    --na-accent-glow: rgba(0, 180, 216, 0.15);
    --na-accent-hover: #00cfff;
    --na-text-primary: #f1f5f9;
    --na-text-secondary: #94a3b8;
    --na-text-muted: #64748b;
    --na-border: rgba(255, 255, 255, 0.08);
    --na-border-accent: rgba(0, 180, 216, 0.3);
    --na-radius: 8px;
    --na-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Global Body ---------- */
body.na-dark-theme {
    background-color: var(--na-bg-deepest) !important;
    color: var(--na-text-primary);
}

body.na-dark-theme .site {
    background-color: var(--na-bg-deepest);
}

/* ---------- Kadence Header ---------- */
body.na-dark-theme .site-header {
    background: rgba(6, 10, 16, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--na-border);
    transition: background var(--na-transition);
}

body.na-dark-theme .site-header.item-is-fixed {
    background: rgba(6, 10, 16, 0.95) !important;
}

/* Header branding */
body.na-dark-theme .site-title,
body.na-dark-theme .site-title a {
    color: #ffffff !important;
    font-weight: 300 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 1.3rem !important;
}

/* Nav links */
body.na-dark-theme .header-navigation .menu > li > a,
body.na-dark-theme .header-navigation .menu > li > .kb-link-wrap > a {
    color: var(--na-text-secondary) !important;
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--na-transition);
}

body.na-dark-theme .header-navigation .menu > li:hover > a,
body.na-dark-theme .header-navigation .menu > li:hover > .kb-link-wrap > a {
    color: var(--na-accent) !important;
}

/* Dropdown menus */
body.na-dark-theme .header-navigation ul ul,
body.na-dark-theme .header-navigation .sub-menu {
    background: var(--na-bg-card) !important;
    border: 1px solid var(--na-border) !important;
    border-radius: var(--na-radius) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

body.na-dark-theme .header-navigation ul ul a {
    color: var(--na-text-secondary) !important;
    transition: color var(--na-transition), background var(--na-transition);
}

body.na-dark-theme .header-navigation ul ul a:hover {
    color: var(--na-accent) !important;
    background: var(--na-accent-glow) !important;
}

/* Cart icon */
body.na-dark-theme .header-cart-wrap .header-cart-button,
body.na-dark-theme .header-cart-wrap a {
    color: var(--na-text-secondary) !important;
}

body.na-dark-theme .header-cart-wrap:hover .header-cart-button,
body.na-dark-theme .header-cart-wrap:hover a {
    color: var(--na-accent) !important;
}

/* ---------- Page Content Area ---------- */
body.na-dark-theme .content-area,
body.na-dark-theme .site-main,
body.na-dark-theme .entry-content-wrap,
body.na-dark-theme .site-container {
    background-color: transparent;
}

body.na-dark-theme .entry-content > *:not(.alignfull):not(.alignwide) {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Typography ---------- */
body.na-dark-theme h1,
body.na-dark-theme h2,
body.na-dark-theme h3,
body.na-dark-theme h4 {
    color: var(--na-text-primary);
    font-weight: 300;
    letter-spacing: 0.03em;
}

body.na-dark-theme p {
    color: var(--na-text-secondary);
}

body.na-dark-theme a {
    color: var(--na-accent);
    transition: color var(--na-transition);
}

body.na-dark-theme a:hover {
    color: var(--na-accent-hover);
}

/* ---------- Buttons ---------- */
body.na-dark-theme .wp-block-button__link,
body.na-dark-theme .button,
body.na-dark-theme button.single_add_to_cart_button,
body.na-dark-theme .wc-block-components-button {
    border-radius: 0 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--na-transition);
    position: relative;
    overflow: hidden;
}

/* Primary buttons - accent filled */
body.na-dark-theme .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background: var(--na-accent) !important;
    color: #000000 !important;
    border: none;
    padding: 16px 36px;
    font-weight: 600;
}

body.na-dark-theme .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    background: var(--na-accent-hover) !important;
    box-shadow: 0 0 30px var(--na-accent-glow);
    transform: translateY(-1px);
}

/* Outline buttons */
body.na-dark-theme .wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 16px 36px;
}

body.na-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:hover {
    border-color: var(--na-accent) !important;
    color: var(--na-accent) !important;
    box-shadow: 0 0 20px var(--na-accent-glow);
}

/* ---------- Cover Blocks (Hero) ---------- */
body.na-dark-theme .wp-block-cover {
    border-radius: 0;
}

body.na-dark-theme .wp-block-cover h1 {
    font-weight: 200 !important;
    letter-spacing: 0.08em;
}

body.na-dark-theme .wp-block-cover h2 {
    font-weight: 300 !important;
}

/* ---------- Cards / Columns ---------- */
body.na-dark-theme .wp-block-column[style*="background"] {
    transition: transform var(--na-transition), box-shadow var(--na-transition);
}

body.na-dark-theme .wp-block-column[style*="background"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ---------- WooCommerce Products ---------- */
body.na-dark-theme .wc-block-grid__product,
body.na-dark-theme ul.products li.product {
    background: var(--na-bg-card);
    border: 1px solid var(--na-border);
    border-radius: var(--na-radius);
    padding: 0;
    overflow: hidden;
    transition: all var(--na-transition);
}

body.na-dark-theme .wc-block-grid__product:hover,
body.na-dark-theme ul.products li.product:hover {
    border-color: var(--na-border-accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 180, 216, 0.1);
}

/* Product image wrapper — clip scaled images so they don't overflow into title/price */
body.na-dark-theme .wc-block-grid__product .wc-block-grid__product-image,
body.na-dark-theme ul.products li.product .woocommerce-LoopProduct-link,
body.na-dark-theme ul.products li.product .woocommerce-loop-product__link,
body.na-dark-theme ul.products li.product a:first-child {
    overflow: hidden;
    display: block;
}

body.na-dark-theme .wc-block-grid__product .wc-block-grid__product-image img,
body.na-dark-theme ul.products li.product .woocommerce-LoopProduct-link img,
body.na-dark-theme ul.products li.product .woocommerce-loop-product__link img,
body.na-dark-theme ul.products li.product a:first-child img {
    border-radius: 0;
    display: block;
    width: 100%;
    transition: transform 0.4s ease;
}

body.na-dark-theme .wc-block-grid__product:hover .wc-block-grid__product-image img,
body.na-dark-theme ul.products li.product:hover .woocommerce-LoopProduct-link img,
body.na-dark-theme ul.products li.product:hover .woocommerce-loop-product__link img,
body.na-dark-theme ul.products li.product:hover a:first-child img {
    transform: scale(1.05);
}

body.na-dark-theme .wc-block-grid__product .wc-block-grid__product-title,
body.na-dark-theme ul.products li.product .woocommerce-loop-product__title {
    color: var(--na-text-primary) !important;
    font-weight: 400 !important;
    font-size: 0.95rem !important;
    padding: 12px 16px 4px;
}

body.na-dark-theme .wc-block-grid__product .wc-block-grid__product-price,
body.na-dark-theme ul.products li.product .price {
    color: var(--na-accent) !important;
    font-weight: 600;
    font-size: 1.05rem !important;
    padding: 0 16px 16px;
}

body.na-dark-theme .wc-block-grid__product .wp-block-button__link,
body.na-dark-theme ul.products li.product .button {
    background: var(--na-accent) !important;
    color: #000 !important;
    border-radius: 0 !important;
    width: 100%;
    text-align: center;
    padding: 12px !important;
    margin: 0 !important;
    font-size: 0.8rem !important;
}

/* ---------- Single Product ---------- */
body.na-dark-theme .product .summary {
    color: var(--na-text-secondary);
}

body.na-dark-theme .product .summary .product_title {
    color: var(--na-text-primary) !important;
    font-weight: 300 !important;
    font-size: 2rem !important;
    letter-spacing: 0.02em;
}

body.na-dark-theme .product .summary .price {
    color: var(--na-accent) !important;
    font-size: 1.5rem !important;
}

body.na-dark-theme .woocommerce-tabs {
    background: var(--na-bg-card);
    border: 1px solid var(--na-border);
    border-radius: var(--na-radius);
    padding: 30px;
    margin-top: 40px;
}

body.na-dark-theme .woocommerce-tabs ul.tabs li a {
    color: var(--na-text-muted) !important;
}

body.na-dark-theme .woocommerce-tabs ul.tabs li.active a {
    color: var(--na-accent) !important;
}

/* ---------- Shop / Archive ---------- */
body.na-dark-theme .woocommerce-result-count,
body.na-dark-theme .woocommerce-ordering select {
    color: var(--na-text-muted);
    background: var(--na-bg-card);
    border-color: var(--na-border);
}

/* ---------- Footer ---------- */
body.na-dark-theme .site-footer {
    background: var(--na-bg-dark) !important;
    border-top: 1px solid var(--na-border);
}

body.na-dark-theme .site-footer,
body.na-dark-theme .site-footer p,
body.na-dark-theme .site-footer .widget,
body.na-dark-theme .footer-widget-area {
    color: var(--na-text-muted) !important;
}

body.na-dark-theme .site-footer a {
    color: var(--na-text-secondary) !important;
}

body.na-dark-theme .site-footer a:hover {
    color: var(--na-accent) !important;
}

/* ---------- Forms & Inputs ---------- */
body.na-dark-theme input[type="text"],
body.na-dark-theme input[type="email"],
body.na-dark-theme input[type="search"],
body.na-dark-theme input[type="password"],
body.na-dark-theme input[type="number"],
body.na-dark-theme input[type="tel"],
body.na-dark-theme textarea,
body.na-dark-theme select {
    background: var(--na-bg-card) !important;
    border: 1px solid var(--na-border) !important;
    color: var(--na-text-primary) !important;
    border-radius: var(--na-radius);
    padding: 12px 16px;
    transition: border-color var(--na-transition);
}

body.na-dark-theme input:focus,
body.na-dark-theme textarea:focus,
body.na-dark-theme select:focus {
    border-color: var(--na-accent) !important;
    box-shadow: 0 0 0 3px var(--na-accent-glow) !important;
    outline: none;
}

/* ---------- Breadcrumbs ---------- */
body.na-dark-theme .kadence-breadcrumbs {
    color: var(--na-text-muted);
}

body.na-dark-theme .kadence-breadcrumbs a {
    color: var(--na-text-secondary);
}

/* ---------- Scrollbar ---------- */
body.na-dark-theme ::-webkit-scrollbar {
    width: 8px;
}

body.na-dark-theme ::-webkit-scrollbar-track {
    background: var(--na-bg-dark);
}

body.na-dark-theme ::-webkit-scrollbar-thumb {
    background: var(--na-bg-surface);
    border-radius: 4px;
}

body.na-dark-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--na-text-muted);
}

/* ---------- Utility: Accent Label (like ArcticSpaces gold labels) ---------- */
.na-accent-label {
    color: var(--na-accent) !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.25em !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
}

/* ---------- Utility: Glow card ---------- */
.na-glow-card {
    background: var(--na-bg-card);
    border: 1px solid var(--na-border);
    border-radius: var(--na-radius);
    transition: all var(--na-transition);
}

.na-glow-card:hover {
    border-color: var(--na-border-accent);
    box-shadow: 0 0 40px var(--na-accent-glow);
    transform: translateY(-4px);
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 768px) {
    body.na-dark-theme .wp-block-cover h1 {
        font-size: 2rem !important;
    }
    
    body.na-dark-theme .wp-block-cover h2 {
        font-size: 1.5rem !important;
    }
    
    body.na-dark-theme .wp-block-columns {
        gap: 16px;
    }
}

/* ---------- Smooth Scrolling ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Selection ---------- */
body.na-dark-theme ::selection {
    background: var(--na-accent);
    color: #000;
}

/* ---------- Loading shimmer for images ---------- */
body.na-dark-theme img {
    transition: opacity 0.3s ease;
}

/* ---------- WooCommerce Cart / Checkout dark ---------- */
body.na-dark-theme .woocommerce-cart .cart_totals,
body.na-dark-theme .woocommerce-checkout .checkout {
    background: var(--na-bg-card);
    border: 1px solid var(--na-border);
    border-radius: var(--na-radius);
    padding: 30px;
}

body.na-dark-theme table.shop_table {
    border-color: var(--na-border) !important;
}

body.na-dark-theme table.shop_table th,
body.na-dark-theme table.shop_table td {
    border-color: var(--na-border) !important;
    color: var(--na-text-secondary);
}

/* ---------- Page title area ---------- */
body.na-dark-theme .entry-hero-container-inner {
    background: var(--na-bg-dark) !important;
}

body.na-dark-theme .entry-hero-container-inner .entry-title {
    color: var(--na-text-primary) !important;
    font-weight: 300 !important;
    letter-spacing: 0.05em;
}

/* ---------- Kadence specific overrides ---------- */
body.na-dark-theme .wp-site-blocks {
    background: var(--na-bg-deepest);
}

body.na-dark-theme .has-palette-8-background-color {
    background-color: var(--na-bg-card) !important;
}

body.na-dark-theme .has-palette-3-color {
    color: var(--na-text-primary) !important;
}

body.na-dark-theme .has-palette-6-color {
    color: var(--na-text-secondary) !important;
}

body.na-dark-theme .has-palette-4-color {
    color: var(--na-text-secondary) !important;
}

body.na-dark-theme .has-palette-9-color {
    color: #ffffff !important;
}

body.na-dark-theme .has-palette-1-color {
    color: var(--na-accent) !important;
}

body.na-dark-theme .has-palette-1-background-color {
    background-color: var(--na-accent) !important;
}
