/* Midnight Blue: preserve Razox/Elementor layout and artwork, share one palette. */
body.gg-midnight {
    --ggm-bg: #04111d;
    --ggm-surface: #0b1d2a;
    --ggm-text: #f5f8fc;
    --ggm-muted: #bdcad7;
    --ggm-accent: #60a5fa;
    --ggm-accent-hover: #93c5fd;
    --ggm-ink: #111827;
    --ggm-border: #2e4b60;
    --ggm-content-width: 1680px;
    --ggm-content-gutter: 30px;
    --ggm-action: linear-gradient(#0072c6, #004ed3 80%);
    --ggm-field-border: #64748b;
    --ggm-font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --body-color: var(--ggm-bg) !important;
    --e-global-color-primary: var(--ggm-accent);
    --e-global-color-secondary: var(--ggm-text);
    --e-global-color-text: var(--ggm-muted);
    --e-global-color-accent: var(--ggm-text);
    --e-global-color-lighter: var(--ggm-muted);
    --e-global-color-dark: var(--ggm-ink);
    --e-global-color-border: var(--ggm-border);
    --e-global-typography-primary-font-family: var(--ggm-font);
    --e-global-typography-secondary-font-family: var(--ggm-font);
    --e-global-typography-tertiary-font-family: var(--ggm-font);
    --e-global-typography-text-font-family: var(--ggm-font);
    --e-global-typography-accent-font-family: var(--ggm-font);
    --e-global-typography-text-font-weight: 400;
    background: var(--ggm-bg) !important;
    color: var(--ggm-muted);
    font-family: var(--ggm-font);
    font-size: 16px;
    line-height: 1.6;
    color-scheme: dark;
}
body.gg-midnight :is(h1, h2, h3, h4, h5, h6, button, input, select, textarea, .elementor-heading-title,
    .elementor-icon-box-description, .e-n-accordion-item-title-text,
    .elementor-button, .gg-hero, .gg-grid, .gg-cards, .gg-promo-banner, .gg-tall-banner, .gg-promo-split,
    .gg-partner, #gg-footer, .gg-footer__nav a, .gg-footer__copy) {
    font-family: var(--ggm-font) !important;
}
body.gg-midnight :is(h1, h2, h3, h4, h5, h6) { color: var(--ggm-text); }
body.gg-midnight :is(button, input, select, textarea) { font-size: 1rem; }
body.gg-midnight :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--ggm-accent);
    outline-offset: 3px;
}
/* Stop the red backdrop competing with game artwork and small product labels. */
body.gg-midnight #gg-fluid-bg { display: none; }
body.gg-midnight ::selection { color: var(--ggm-ink); background: var(--ggm-accent-hover); }

/* The header element IDs are retained by the translated Elementor templates. */
/* Elementor's document cache can retain the legacy markup across deployments. */
body.gg-midnight:not(.elementor-editor-active) #masthead .elementor-element-a00259e { display: none !important; }
body.gg-midnight :is(.main-navigation .sub-menu, .razox-language-switcher .sub-item,
    .site-header-account .account-dropdown, .razox-mobile-nav, .razox-canvas-menu) {
    background: var(--ggm-surface);
    color: var(--ggm-text);
    border-color: var(--ggm-border);
}
body.gg-midnight #masthead :is(.main-navigation .sub-menu a, .razox-language-switcher .sub-item span),
body.gg-midnight .razox-mobile-nav a { color: var(--ggm-text) !important; }
body.gg-midnight #masthead :is(.main-navigation .sub-menu a:hover, .razox-language-switcher .sub-item a:hover span) {
    color: var(--ggm-accent) !important;
}
body.gg-midnight :is(.header-cart .count, .header-wishlist .count, .site-header-wishlist .count, .site-header-cart .count) {
    color: var(--ggm-ink);
    background: var(--ggm-accent);
}
body.gg-midnight .getagame-regional-currency-menu .wcml_currency_switcher :is(li, button) {
    background: var(--ggm-surface) !important;
    color: var(--ggm-text) !important;
    border-color: var(--ggm-field-border) !important;
    font-family: var(--ggm-font) !important;
}
body.gg-midnight .getagame-regional-currency-menu .wcml_currency_switcher :is(li, button):is(:hover, :focus-visible) {
    background: #334155 !important;
    color: var(--ggm-text) !important;
}

/* Elementor pages set their own spacing, including the first homepage row. */
@media (min-width: 768px) {
    body.gg-midnight:not(.elementor-page, .home, .woocommerce-checkout) #page .site-content {
        margin-top: clamp(22px, 2vw, 32px);
    }
}
body.gg-midnight:is(.woocommerce-cart, .woocommerce-checkout, .post-type-archive-product, .tax-product_cat, .single-product) #page .site-content {
    margin-top: clamp(8px, 1vw, 16px);
}
body.gg-midnight:is(.post-type-archive-product, .tax-product_cat, .single-product) .breadcrumb-wrap .e-con:has(> .e-con-inner > .elementor-widget-razox-breadcrumb) {
    --padding-top: clamp(8px, 1vw, 16px);
    --padding-bottom: 0px;
    --margin-bottom: 0px;
    --row-gap: 4px;
}
body.gg-midnight.razox-full-width-content:is(.woocommerce-cart, .woocommerce-checkout) #page .site-content .entry-header {
    padding-bottom: clamp(12px, 1.5vw, 24px);
}
body.gg-midnight.home #main > .elementor > .elementor-element-0a6cbd5:first-child > .e-con-inner {
    padding-top: clamp(12px, 1.5vw, 24px);
}

/* Existing hero and banner sizes remain responsive. */
body.gg-midnight :is(.gg-hero, .gg-grid, .gg-cards, .gg-promo-banner, .gg-tall-banner, .gg-promo-split) {
    --gg-accent: var(--ggm-accent) !important;
    --gg-bg: var(--ggm-surface) !important;
    --gg-text: var(--ggm-text) !important;
}
body.gg-midnight .gg-hero {
    background: linear-gradient(120deg, #253449, var(--ggm-bg));
    border: 1px solid var(--ggm-border);
}
body.gg-midnight .gg-hero__bg { filter: blur(70px) saturate(.4) brightness(.4); opacity: .22; }
body.gg-midnight .gg-hero__bg.is-active { opacity: .22; }
body.gg-midnight .gg-hero__canvas { opacity: .12; }
body.gg-midnight .gg-hero__title {
    font-size: clamp(28px, 3.2vw, 46px);
    line-height: 1.15;
    letter-spacing: -.025em;
    text-transform: none;
}
body.gg-midnight :is(.gg-hero__price, .gg-card__price, .gg-grid__price) { color: var(--ggm-text); }
body.gg-midnight :is(.gg-hero__counter, .gg-tall-banner__badge, .gg-tall-banner__subtitle, .gg-promo-banner__badge) {
    color: var(--ggm-muted);
}
body.gg-midnight :is(.gg-tall-banner__cat, .gg-promo-banner__cat) {
    color: var(--ggm-text);
    border-color: var(--ggm-accent);
}
body.gg-midnight :is(.gg-tall-banner__title, .gg-promo-banner__title) {
    font-size: clamp(23px, 2.25vw, 34px);
    line-height: 1.2;
    text-transform: none;
}
body.gg-midnight :is(.gg-hero__btn, .gg-partner .gg-partner__button, .single_add_to_cart_button,
    .checkout-button, :where(#place_order), .elementor-button, .gg-btn--accent) {
    background: var(--ggm-accent) !important;
    border-color: var(--ggm-accent) !important;
    color: var(--ggm-ink) !important;
    font-weight: 600;
}
body.gg-midnight :is(.gg-hero__btn, .gg-partner .gg-partner__button, .single_add_to_cart_button,
    .checkout-button, :where(#place_order), .elementor-button, .gg-btn--accent):hover {
    background: var(--ggm-accent-hover) !important;
    border-color: var(--ggm-accent-hover) !important;
    color: var(--ggm-ink) !important;
}
body.gg-midnight .elementor-button :is(.elementor-button-text, .elementor-button-icon) { color: inherit; }
body.gg-midnight :is(.single_add_to_cart_button, #place_order, .cfw-primary-btn):is(:disabled, [aria-disabled="true"], .disabled) {
    background: #475569 !important;
    border-color: #64748b !important;
    color: var(--ggm-text) !important;
    cursor: not-allowed;
}
body.gg-midnight .elementor-widget.elementor-button-link .elementor-button {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--ggm-text) !important;
}
body.gg-midnight .elementor-widget.elementor-button-link .elementor-button:hover { color: var(--ggm-accent) !important; }
body.gg-midnight .gg-hero__arrow:hover { color: var(--ggm-ink); }

/* Preserve the existing card grid, square artwork and footer controls. */
body.gg-midnight :is(.product-block, .content-product-imagin, .gg-card, .gg-grid__item) {
    background: var(--ggm-surface);
    border-color: var(--ggm-border);
}
body.gg-midnight .product-block:hover { border-color: var(--ggm-accent); }
body.gg-midnight ul.products li.product :is(h2, h3, .woocommerce-loop-product__title) {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
    text-transform: none;
    min-height: 2.9em;
}
body.gg-midnight .product-caption .price { color: var(--ggm-text); font-size: 24px; font-weight: 700; }
body.gg-midnight .product-caption :is(a[class*="product_type_"], button[class*="product_type_"]) {
    color: var(--ggm-ink);
    background: #f1f5f9;
    border-color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    white-space: normal;
    line-height: 1.35;
}
body.gg-midnight .product-caption :is(a[class*="product_type_"], button[class*="product_type_"]):hover {
    color: var(--ggm-ink);
    background: var(--ggm-accent-hover);
}
body.gg-midnight .elementor-widget-heading .elementor-heading-title {
    line-height: 1.25;
    letter-spacing: -.02em;
}
body.gg-midnight .gg-partner .gg-partner__inner { background: var(--ggm-surface); border-color: var(--ggm-border); }
body.gg-midnight .gg-partner .gg-partner__eyebrow { color: var(--ggm-accent); }
body.gg-midnight .gg-partner .gg-partner__description { color: var(--ggm-muted); }

/* Footer has its own late inline stylesheet in the parent theme. */
body.gg-midnight #gg-footer, body.gg-midnight footer#colophon { background: var(--ggm-surface) !important; }
body.gg-midnight #gg-footer { color: var(--ggm-muted); }
body.gg-midnight #gg-footer::before { background: linear-gradient(90deg, transparent, var(--ggm-accent), transparent); }
body.gg-midnight #gg-footer :is(.gg-footer__desc, .gg-footer__nav a, .gg-footer__copy, .gg-footer__copy a,
    .gg-footer__support-text a, .gg-footer__support-text span) { color: var(--ggm-muted); }
body.gg-midnight #gg-footer .gg-footer__col-title { color: var(--ggm-text); font-size: 13px; }
body.gg-midnight #gg-footer :is(a:hover, .gg-brand-link) { color: var(--ggm-accent); }
body.gg-midnight #gg-footer .gg-footer__support-icon { background: #1e3a5f; color: var(--ggm-accent); }
body.gg-midnight .scrollup { background: var(--ggm-accent); color: var(--ggm-ink); }

/* A shared wide storefront shell; editorial text keeps the theme's readable measure. */
body.gg-midnight:not(.gg-cinematic) #page #content {
    padding-inline: 0;
}
body.gg-midnight:not(.gg-cinematic) #content > .col-full {
    width: calc(100% - 2 * var(--ggm-content-gutter));
    max-width: var(--ggm-content-width);
    margin-inline: auto;
    padding-inline: 0;
}
body.gg-midnight .breadcrumb-wrap .e-con-boxed > .e-con-inner {
    --container-max-width: var(--ggm-content-width);
}
body.gg-midnight:not(.woocommerce-checkout) .entry-header .entry-title {
    font-size: clamp(30px, 2.5vw, 40px);
    line-height: 1.2;
}
body.gg-midnight.page:not(.woocommerce-page, .elementor-page) .site-main h1 {
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.2;
}
body.gg-midnight :is(.single_add_to_cart_button, .checkout-button,
    .woocommerce-form-login__submit, .woocommerce-form-register__submit,
    .woocommerce-MyAccount-content button[type="submit"], .return-to-shop .button,
    .product-caption a[class*="product_type_"]) {
    background: var(--ggm-action) !important;
    border: 1px solid #29a7ff !important;
    border-radius: 8px;
    color: #fff !important;
    min-height: 44px;
    font-weight: 700;
}
body.gg-midnight :is(.single_add_to_cart_button, .checkout-button,
    .woocommerce-form-login__submit, .woocommerce-form-register__submit,
    .woocommerce-MyAccount-content button[type="submit"], .return-to-shop .button,
    .product-caption a[class*="product_type_"]):hover {
    background: #0061df !important;
    color: #fff !important;
}
body.gg-midnight .single_add_to_cart_button:is(:disabled, [aria-disabled="true"], .disabled) {
    background: #475569 !important;
    border-color: #64748b !important;
    color: var(--ggm-text) !important;
}
@media (min-width: 1440px) {
    /* Wider page gutters must not turn the product cover into a giant poster. */
    body.gg-midnight.single-product div.product .content-single-images-wrapper {
        max-width: 690px;
    }
}

@media (max-width: 900px) {
    body.gg-midnight .gg-hero { --gg-height: 640px !important; }
    body.gg-midnight .gg-hero__title { font-size: 28px; }
}
@media (max-width: 560px) {
    body.gg-midnight .gg-hero__slide { padding: 28px 24px 74px; gap: 16px; }
    body.gg-midnight .gg-hero__img { height: 160px; }
    body.gg-midnight .gg-hero__img-scene { width: 140px; }
    body.gg-midnight .gg-hero__title { font-size: 26px; }
    body.gg-midnight .gg-tall-banner__title { font-size: 26px; }
}
@media (max-width: 767px) {
    body.gg-midnight { --ggm-content-gutter: 15px; }
    body.gg-midnight ul.products li.product :is(h2, h3, .woocommerce-loop-product__title) { font-size: 16px; }
    body.gg-midnight .product-caption .product-caption-footer { gap: 8px; flex-wrap: wrap; }
    body.gg-midnight .product-caption .price { font-size: 18px; }
    body.gg-midnight .product-caption :is(a[class*="product_type_"], button[class*="product_type_"]) { font-size: 13px; }
}
@media (max-width: 600px) {
    /* WordPress positions its mobile toolbar relative to Razox's body. */
    body.gg-midnight.admin-bar #wpadminbar {
        top: calc(0px - var(--wp-admin--admin-bar--height, 46px));
    }
}
