/**
 * Theme Name: Spectra One
 * Author: Brainstorm Force
 * Author URI: https://brainstormforce.com/
 * Description: Spectra One is a beautiful and modern WordPress theme built with the Full Site Editing (FSE) feature. It's a versatile theme that can be used for blogs, portfolios, businesses, and more. Spectra One comes with a sleek and professional design that will make your website stand out from the crowd.
 * Requires at least: 6.1
 * Tested up to: 6.8
 * Requires PHP: 7.4
 * Version: 1.1.8
 * License: GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: spectra-one
 * Tags: full-site-editing, blog, theme-options, translation-ready, rtl-language-support, full-width-template
*/

/* --- Antigravity Nuclear Header Fixes (Final v3) --- */

/* 1. FORCE WHITE BACKGROUND & STICKY POSITIONING */
header.wp-block-template-part,
header.swt-transparent-header,
.swt-transparent-header>.wp-block-group,
.swt-transparent-header .wp-block-group,
.site-header {
    background-color: #ffffff !important;
    background: #ffffff !important;
    padding-top: 0px !important;
    /* ULTRA COMPACT */
    padding-bottom: 0px !important;
    /* ULTRA COMPACT */
    min-height: auto !important;
    height: auto !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

    /* STICKY HEADER */
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
}

/* --- Antigravity Layout Multi-Fix (Final V5) --- */

/* 1. HEADER ALIGNMENT (Vertical Center) */
header .main-header-flex,
.swt-transparent-header .main-header-flex,
header .wp-block-group,
header .header-nav-container,
header .wp-block-navigation__container,
header .wp-block-navigation-item {
    align-items: center !important;
}

/* 2. REMOVE DUPLICATE CART (Refined Selectors) */
/* Option A: Hides Nav Item containing cart link (Link Text) */
.wp-block-navigation-item:has(a[href*="/cart/"]),
.wp-block-navigation-item:has(a[href*="cart"]),
.wp-block-navigation-item.current-menu-item a[href*="cart"] {
    display: none !important;
}

/* Option B: Fallback if :has not supported -> hide common cart classes in nav */
.wp-block-navigation-item.cart-item,
.header-nav-container>ul>li>a[href*="cart"] {
    display: none !important;
}

/* Ensure the Mini Cart BLOCK (Icon) stays visible */
.wc-block-mini-cart {
    display: flex !important;
}

/* 3. FOOTER REFINEMENT */
/* Smaller Footer Logo */
footer .site-logo-img img,
.site-footer .site-logo-img img,
.managed-footer .site-logo-img img,
.wp-block-footer-logo img {
    max-width: 90px !important;
    height: auto !important;
    margin-bottom: 5px !important;
}

/* Remove Description Text below Footer Logo */
.footer-description,
footer .site-logo-img+p,
.site-footer p:has(> .site-logo-img)+p,
.wp-block-group.footer-description {
    display: none !important;
}

/* 4. REMOVE BOTTOM SPACING */
body,
html {
    height: auto !important;
    margin-bottom: 0 !important;
}

footer,
.site-footer {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

footer .wp-block-group,
.site-footer>.wp-block-group {
    padding-bottom: 20px !important;
    /* Minimal breathing room */
}

/* 5. SERVICES PAGE BUTTON (Orange) */
/* Targets 'Contact Us' button specifically on Services Page */
/* Overrides 'has-secondary-background-color' */
body.page-id-98 .wp-block-button__link,
body.page-id-98 a.wp-block-button__link[href*="contact"] {
    background-color: #FFA500 !important;
    /* Orange */
    color: #ffffff !important;
    /* White */
    border: none !important;
}

body.page-id-98 .wp-block-button__link:hover,
body.page-id-98 a.wp-block-button__link[href*="contact"]:hover {
    background-color: #cc8400 !important;
    /* Darker Orange Hover */
    transform: translateY(-2px);
}

/* 2. FORCE SINGLE LINE LAYOUT - Parent Containers */
header .main-header-flex,
.swt-transparent-header .main-header-flex,
header .wp-block-group.is-nowrap {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    /* PACK TO RIGHT (RTL START) */
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 30px !important;
    /* Gap between Logo and Menu */
    overflow: visible !important;
}

/* CRITICAL FIX: Prevent Children from consuming 50% width */
header .main-header-flex>.wp-block-group,
header .main-header-flex>div {
    width: auto !important;
    max-width: none !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    margin: 0 !important;
}

/* 3. LOGO CONSTRAINTS - Ultra Compact */
header .site-logo-img,
header .site-logo-img img {
    width: auto !important;
    max-width: 100px !important;
    /* ULTRA COMPACT (100px) */
    height: auto !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 4. NAVIGATION CONTAINER - Do NOT Grow, Pack Right */
header .header-nav-container,
.header-nav-container {
    display: flex !important;
    flex-grow: 0 !important;
    /* Do not take up empty space */
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    min-width: 0 !important;
}

/* 5. NAVIGATION ITEMS - The actual menu */
header .wp-block-navigation__container,
header nav.wp-block-navigation,
.custom-header-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

/* 6. UNIVERSAL FONT SIZE & ICON STYLING */
header .wp-block-navigation-item__content,
header .wp-block-navigation-item a,
header .wc-block-mini-cart__button,
header .wp-block-woocommerce-customer-account a,
header .wc-block-mini-cart__amount {
    font-size: 20px !important;
    /* UNIVERSAL SIZE */
    font-weight: 700 !important;
    color: #333333 !important;
    text-decoration: none !important;
    padding: 5px 8px !important;
    line-height: 1.2 !important;
}

/* Hover effect */
header .wp-block-navigation-item__content:hover,
header .wp-block-navigation-item a:hover {
    color: #007bff !important;
}

/* Icons Size */
header .wc-block-mini-cart__icon,
header .wp-block-woocommerce-customer-account .wp-block-woocommerce-customer-account__icon {
    width: 24px !important;
    height: 24px !important;
}

/* 7. HIDE/FIX WOOCOMMERCE ICONS IF CAUSING WRAP */
header .wp-block-woocommerce-mini-cart,
header .wp-block-woocommerce-customer-account {
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
}

/* 8. Balance Group (Right Spacer) - HIDE to allow packing */
header .wp-block-group[style*="width: 120px"] {
    display: none !important;
}

/* 10. Override Any Conflicting Package Builder Styles - CRITICAL */
/* These rules ensure header styles work even when package-builder.css is loaded */
/* Package builder header styles integrated into main rules */

/* CSS hiding rules removed */

/* --- Antigravity Product Card Fixes --- */

/* Force Square Product Cards */
.product-card-square {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
}

.product-image-container,
.wp-block-post-featured-image {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    position: relative !important;
    background: #fff !important;
    margin: 0 !important;
}

.product-image-container img,
.wp-block-post-featured-image img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 15px !important;
}


.product-card-square:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.product-card-square .wp-block-post-title a {
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 2.8em !important;
}

/* Sidebar Hover Effects */
.sidebar-cat-item {
    transition: all 0.2s ease !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
}

.sidebar-cat-item:hover {
    background: #f8f9fa !important;
    color: #007bff !important;
}

.sidebar-cat-item:hover a {
    color: #007bff !important;
}

/* Page Layout Fixes for Free Support Page */
.page-free-support-container {
    padding: var(--wp--preset--spacing--medium) 0;
    background-color: var(--wp--preset--color--background);
}

.page-free-support-section {
    margin-bottom: var(--wp--preset--spacing--large);
    padding: var(--wp--preset--spacing--x-large);
}

.page-free-support-title {
    font-size: var(--wp--preset--font-size--x-large);
    font-weight: var(--wp--custom--font-weight--semi-bold);
    color: var(--wp--preset--color--heading);
    margin-bottom: var(--wp--preset--spacing--small);
    text-align: center;
}

.page-free-support-content {
    line-height: 1.8;
    color: var(--wp--preset--color--body);
}

.page-free-support-issue {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--outline);
    border-radius: var(--wp--custom--border-radius--medium);
    padding: var(--wp--preset--spacing--x-large);
    margin-bottom: var(--wp--preset--spacing--large);
}

.page-free-support-issue-content {
    padding: var(--wp--preset--spacing--medium);
}

.page-free-support-issue h3 {
    font-size: var(--wp--preset--font-size--large);
    font-weight: var(--wp--custom--font-weight--semi-bold);
    color: var(--wp--preset--color--heading);
    margin-bottom: var(--wp--preset--spacing--small);
}

.page-free-support-issue ul {
    margin: 0;
    padding-left: var(--wp--preset--spacing--large);
}

.page-free-support-issue li {
    margin-bottom: var(--wp--preset--spacing--small);
    line-height: 1.6;
}

.page-free-support-issue strong {
    font-weight: var(--wp--custom--font-weight--bold);
}

.page-free-support-footer {
    margin-top: var(--wp--preset--spacing--x-large);
    padding-top: var(--wp--preset--spacing--x-large);
    border-top: 1px solid var(--wp--preset--color--outline);
}

/* Mobile Responsiveness Fixes */
@media (max-width: 768px) {

    /* Header Navigation Mobile Fixes */
    .site-header .wp-block-navigation__container {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--wp--preset--spacing--small);
    }

    .site-header .wp-block-navigation-item {
        width: 100%;
        margin-bottom: var(--wp--preset--spacing--small);
    }

    .site-header .wp-block-navigation-item a {
        display: block;
        padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium);
        width: 100%;
    }

    .site-header .wp-block-navigation-submenu {
        position: static;
        display: block;
        width: 100%;
        max-height: none;
        overflow: visible;
    }

    .site-header .wp-block-navigation-submenu .wp-block-navigation__submenu-container {
        position: static;
        display: block;
        width: 100%;
        box-shadow: none;
        padding-left: var(--wp--preset--spacing--large);
    }

    /* Fix overlapping elements */
    .wp-block-columns {
        flex-direction: column;
        gap: var(--wp--preset--spacing--medium);
    }

    .wp-block-column {
        width: 100% !important;
        flex-basis: 100% !important;
    }

    /* Fix broken links on mobile */
    a,
    button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .wp-block-button__link {
        width: 100%;
        text-align: center;
        padding: var(--wp--preset--spacing--medium) var(--wp--preset--spacing--large);
    }

    /* Free Support Page Mobile Fixes */
    .page-free-support-section {
        padding: var(--wp--preset--spacing--large) var(--wp--preset--spacing--small);
    }

    .page-free-support-issue {
        padding: var(--wp--preset--spacing--medium);
    }

    .page-free-support-issue-content {
        padding: var(--wp--preset--spacing--small);
    }

    .page-free-support-issue ul {
        padding-left: var(--wp--preset--spacing--medium);
    }

    /* Package Builder Mobile Fixes */
    .package-builder-container {
        padding: var(--wp--preset--spacing--small);
    }

    .package-builder-categories {
        flex-direction: column;
        gap: var(--wp--preset--spacing--small);
    }

    .package-builder-category-tab {
        width: 100%;
        text-align: center;
        padding: var(--wp--preset--spacing--small);
    }

    .package-builder-products-grid {
        grid-template-columns: 1fr;
        gap: var(--wp--preset--spacing--small);
    }

    .product-card {
        padding: var(--wp--preset--spacing--small);
    }

    .product-card-image {
        max-width: 100%;
        height: auto;
    }

    .product-card-actions {
        flex-direction: column;
        gap: var(--wp--preset--spacing--small);
    }

    .product-card-actions button {
        width: 100%;
    }

    .package-builder-summary {
        margin-top: var(--wp--preset--spacing--medium);
        padding: var(--wp--preset--spacing--medium);
    }

    /* Footer Mobile Fixes */
    .site-footer {
        padding: var(--wp--preset--spacing--medium);
    }

    .site-footer .wp-block-columns {
        gap: var(--wp--preset--spacing--medium);
    }

    /* Fix hidden menus */
    .wp-block-navigation__responsive-container {
        display: block !important;
    }

    .wp-block-navigation__responsive-container.is-menu-open {
        display: block !important;
    }

    /* Fix overlapping content */
    body {
        overflow-x: hidden;
    }

    .wp-block-group,
    .wp-block-cover,
    .wp-block-columns {
        overflow: hidden;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .page-free-support-title {
        font-size: var(--wp--preset--font-size--large);
    }

    .page-free-support-issue h3 {
        font-size: var(--wp--preset--font-size--medium);
    }

    .page-free-support-issue {
        padding: var(--wp--preset--spacing--small);
    }

    .wp-block-button__link {
        font-size: var(--wp--preset--font-size--small);
        padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium);
    }
}

/* --- Antigravity Layout Multi-Fix (Final V6) --- */

/* 1. HEADER WIDTH & ALIGNMENT (Centered & Narrower) */
header .main-header-flex,
.swt-transparent-header .main-header-flex,
header .wp-block-group.alignfull {
    max-width: 1400px !important;
    /* Limit width */
    margin-left: auto !important;
    /* Center Horizontally */
    margin-right: auto !important;
    /* Center Horizontally */
    width: 95% !important;
    /* Prevent edge touching on small screens */
}

/* 2. FOOTER LOGO 2.0 (Smaller & Higher) */
footer .site-logo-img img,
.site-footer .site-logo-img img,
.managed-footer .site-logo-img img,
.wp-block-footer-logo img {
    max-width: 70px !important;
    /* Reduced from 90px */
    margin-bottom: 25px !important;
    /* Push text away / Move logo logically up from bottom elements */
}

/* 3. CREATE PACKAGE PAGE (Colors & Contrast) */
/* Page ID: 78 */
body.page-id-78,
body.page-id-78 p,
body.page-id-78 li,
body.page-id-78 label {
    color: #222 !important;
    /* Force darker text generally */
}

/* Summary Card Specifics */
body.page-id-78 .b-summary-card,
body.page-id-78 div[class*="summary"],
body.page-id-78 .wp-block-group.has-background {
    border-color: #007cba !important;
    /* Ensure border is visible */
}

/* Make grey product names darker */
body.page-id-78 span[style*="color"],
body.page-id-78 .has-text-color {
    color: #111 !important;
    /* Override light greys */
}

/* Ensure Total Amount is distinct */
body.page-id-78 .total-amount,
body.page-id-78 strong {
    color: #007cba !important;
    font-weight: 800 !important;
}