/* 
Theme Name: Blocksy Child - Shop Apex 
Theme URI: https://sklepapex.pl/ 
Description: Blocksy Child Theme for Shop Apex (Monochrome Navy Design) 
Author: Antigravity 
Author URI: https://sklepapex.pl/ 
Template: blocksy 
Version: 2.7.0 (SEO Section Added) 
*/

:root {
    /* Twój "Fiolet"/Granat */
    --apex-color: #16213E;
    --apex-color-hover: #0f1629;

    /* Nadpisanie zmiennych Blocksy */
    --theme-palette-color-1: #16213E;
    --theme-palette-color-2: #0f1629;
    --theme-link-hover-color: #16213E;
}

/* =========================================
   1. FUNDAMENTALS
   ========================================= */
body {
    background-color: #ffffff;
    color: #333333;
    font-family: 'Inter', sans-serif;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.widget-title,
.entry-title,
.header-menu-primary a {
    color: var(--apex-color) !important;
}

.header-menu-primary a:hover {
    color: var(--theme-palette-color-2) !important;
    text-decoration: underline;
}

/* =========================================
   3. BUTTONS & ACTIONS
   ========================================= */
.ct-button,
.button,
button,
input[type="submit"],
.woocommerce button.button.alt,
.woocommerce a.button.alt {
    background-color: var(--apex-color) !important;
    color: #ffffff !important;
    border: none !important;
    transition: all 0.3s ease;
}

/* Fix: Prevent header search button from getting the global button hover background */
.ct-button:not(.ct-header-search):hover,
.button:hover,
button:not(.ct-header-search):hover,
input[type="submit"]:hover {
    background-color: var(--apex-color-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(22, 33, 62, 0.3);
}

/* Explicitly reset header search button hover */
.ct-header-search:hover {
    background-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.price,
.amount {
    color: var(--apex-color) !important;
    font-weight: 700;
}

/* Header Icons (Search, Cart, Account) */
.ct-header-trigger svg,
.ct-cart-content svg,
.ct-account-item svg {
    fill: var(--apex-color) !important;
    color: var(--apex-color) !important;
}

/* =========================================
   4. LAYOUT
   ========================================= */
/* .site-header styles removed to allow Customizer settings */

.site-footer {
    background-color: var(--apex-color) !important;
    color: #e0e0e0 !important;
}

.ct-pagination .current,
.form-row .input-checkbox:checked+label:before {
    background-color: var(--apex-color) !important;
    border-color: var(--apex-color) !important;
}

/* =========================================
   5. CUSTOM HOMEPAGE (Animation Ready)
   ========================================= */

/* Hero Section */
.apex-hero {
    position: relative;
    background-color: transparent;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    text-align: center;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Canvas Background */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.apex-hero h1 {
    color: var(--apex-color) !important;
    font-size: 4em;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    position: relative;
    z-index: 2;
    text-shadow:
        0 0 20px #ffffff,
        0 0 10px #ffffff,
        0 0 5px #ffffff;
}

.apex-hero p {
    color: #555;
    font-size: 1.25em;
    max-width: 700px;
    margin: 0 auto 30px auto;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px #ffffff;
    background: rgba(255, 255, 255, 0.4);
    padding: 10px;
    border-radius: 8px;
    backdrop-filter: blur(2px);
}

.apex-hero .ct-button {
    background-color: var(--apex-color) !important;
    color: #ffffff !important;
    padding: 18px 45px;
    font-size: 1.1em;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.apex-hero .ct-button:hover {
    background-color: var(--apex-color-hover) !important;
    transform: translateY(-3px);
}

/* Features Grid */
.apex-features {
    padding: 20px 0 80px 0;
    border: none;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    perspective: 1000px;
}

/* Premium Feature Card */
.feature-box {
    text-align: center;
    padding: 40px 25px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
    z-index: 1;
}

.feature-box:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px -5px rgba(240, 90, 24, 0.15);
    border-color: rgba(240, 90, 24, 0.2);
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.feature-box:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-box h3 {
    margin: 10px 0 10px 0;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--apex-color);
    letter-spacing: -0.5px;
}

.feature-box p {
    color: #888;
    font-size: 0.95em;
    margin: 0;
    line-height: 1.5;
}

/* Products Section */
.apex-products-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--apex-color);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .apex-hero h1 {
        font-size: 2.5em;
    }

    .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .apex-hero {
        padding: 0;
        min-height: 100dvh;
    }

    .feature-box:hover {
        transform: none !important;
        box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04) !important;
        border-color: rgba(0, 0, 0, 0.03) !important;
    }

    .feature-box {
        margin-bottom: 15px;
    }
}

.site-title {
    display: none !important;
}

[class*="ct-header-trigger"]:hover,
[class*="ct-header-trigger"]:hover::before,
[class*="ct-header-trigger"]:hover::after,
.ct-cart-content:hover,
.ct-cart-content:hover::before,
.ct-cart-content:hover::after,
.ct-account-item:hover,
.ct-account-item:hover::before {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

[class*="ct-header-trigger"]::before,
[class*="ct-header-trigger"]::after,
.ct-cart-content::before,
.ct-cart-content::after,
.ct-account-item::before {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

[class*="ct-header-trigger"]:hover svg,
.ct-cart-content:hover svg,
.ct-account-item:hover svg {
    fill: var(--apex-color) !important;
    color: var(--apex-color) !important;
}

/* =========================================
   6. ACTIVE MENU ITEM (ORANGE PILL)
   ========================================= */
.header-menu-1 .menu-item.current-menu-item>a,
.header-menu-1 .menu-item.current_page_item>a {
    background-color: #F05A18 !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    border-radius: 4px;
    font-weight: 600;
    height: auto !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-self: center !important;
    margin-top: auto;
    margin-bottom: auto;
}

.header-menu-1 .menu-item.current-menu-item>a:hover,
.header-menu-1 .menu-item.current_page_item>a:hover {
    background-color: #d64d13 !important;
    color: #ffffff !important;
}

/* =========================================
   7. LIVE AJAX SEARCH DROPDOWN
   ========================================= */
.apex-live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    overflow: hidden;
    margin-top: 12px;
    border: 1px solid #f0f0f0;
    text-align: left;
    min-width: 280px;
}

.apex-live-search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.apex-live-search-results li {
    border-bottom: 1px solid #f7f7f7;
}

.apex-live-search-results li:last-child {
    border-bottom: none;
}

.apex-live-search-results a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    transition: background 0.2s ease;
    gap: 15px;
}

.apex-live-search-results a:hover {
    background-color: #fcfcfc;
}

.apex-live-search-results img {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eee;
    flex-shrink: 0;
    margin: 0 !important;
}

.apex-search-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apex-search-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--apex-color);
    line-height: 1.3;
    margin-bottom: 4px;
}

.apex-search-price {
    font-size: 13px;
    color: #F05A18;
    font-weight: 700;
}

.apex-search-loading {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.apex-search-no-results,
.apex-search-error {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.apex-search-view-all {
    display: block;
    padding: 14px;
    background: #f9f9f9;
    color: var(--apex-color) !important;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid #eee;
    transition: all 0.2s;
}

.apex-search-view-all:hover {
    background: var(--apex-color);
    color: #fff !important;
    text-decoration: none;
}

/* =========================================
   8. HEADER SEARCH (SKLEPAKCES STYLE)
   ========================================= */

/* 1. Modal Container -> Top Bar Overlay */
#search-modal {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    background-color: transparent !important;
    transition: opacity 0.3s ease;
}

#search-modal.active {
    opacity: 1;
    visibility: visible;
}

/* 2. The White Bar itself */
#search-modal .ct-panel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 140px;
    /* Increased Height */
    background-color: #ffffff;
    /* PADDING UPDATE: 60px top to move input down */
    padding: 60px 40px 30px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#search-modal.active .ct-panel-content {
    transform: translateY(0);
}

/* 3. The Search Form Container */
#search-modal .ct-search-form {
    width: 100%;
    max-width: 1000px;
    position: relative;
    margin: 0 auto;
    display: flex !important;
    align-items: center;
    gap: 30px;
}

/* 4. Input Styling (Clean & Minimal) */
#search-modal .modal-field {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #eee;
    font-size: 28px;
    font-weight: 500;
    color: #333;
    padding: 10px 0;
    height: auto;
    border-radius: 0;
}

#search-modal .modal-field:focus {
    outline: none;
    border-bottom-color: var(--apex-color);
}

#search-modal .modal-field::placeholder {
    color: #ccc;
    font-weight: 400;
}

/* 5. Search Button (The "Broken" Square Fix) */
/* FIX: Disable absolute positioning so Flex Gap works! */
#search-modal .ct-search-form-controls {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    height: auto !important;
    width: auto !important;
    background: transparent !important;
}

#search-modal .ct-search-form-controls .button,
#search-modal button[type="submit"] {
    background: var(--apex-color) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0 !important;
}

/* FORCE SVG VISIBILITY & SIZE */
#search-modal button[type="submit"] svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    fill: #ffffff !important;
    display: block !important;
    --theme-icon-size: 24px !important;
}

/* 6. Close Button - Fix Positioning */
#search-modal .ct-panel-actions {
    position: absolute !important;
    top: 50% !important;
    right: 40px !important;
    transform: translateY(-50%) !important;
    width: auto !important;
    height: auto !important;
    z-index: 10002 !important;
}

#search-modal .ct-toggle-close {
    width: 44px;
    height: 44px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 1 !important;
}

#search-modal .ct-toggle-close:hover {
    background: #FFDADA;
    color: #cc0000;
}

#search-modal .ct-toggle-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    color: #333;
}

/* 7. Hide DEFAULTS to prevent overlap/duplicates */
#search-modal .ct-search-results {
    display: none !important;
}

/* 8. Ensure our results are positioned correctly relative to the bar */
#search-modal .apex-live-search-results {
    top: 100%;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    border: none;
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 10100;
}

/* =========================================
   9. SEO SECTION / WHY CHOOSE US
   ========================================= */
.apex-seo-section {
    padding: 80px 0;
    background-color: #f9f9f9;
    /* Light background to separate */
    position: relative;
    overflow: hidden;
}

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.seo-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--apex-color);
}

.seo-content p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

.seo-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.seo-item {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
    text-align: center;
}

.seo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.seo-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.seo-item h4 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: var(--apex-color);
}

.seo-item p {
    font-size: 0.9em;
    color: #888;
    line-height: 1.4;
    margin: 0;
}

.ct-button-ghost {
    background: transparent !important;
    border: 2px solid var(--apex-color) !important;
    color: var(--apex-color) !important;
}

.ct-button-ghost:hover {
    background: var(--apex-color) !important;
    color: #ffffff !important;
}

@media (max-width: 991px) {
    .seo-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .seo-features {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* =========================================
   10. BLOG & ARCHIVE STYLING
   ========================================= */
/* Clean up the grid container spacing */
.blog .ct-container,
.archive .ct-container {
    padding-top: 50px;
    padding-bottom: 80px;
}

/* Post Card Styling (Premium Card Look) */
.blog article,
.archive article {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Uniform height */
}

.blog article:hover,
.archive article:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(22, 33, 62, 0.1);
}

/* Feature Image Zoom Effect */
.ct-media-container {
    overflow: hidden;
    border-radius: 16px 16px 0 0 !important;
}

.ct-media-container img {
    transition: transform 0.5s ease;
}

.blog article:hover .ct-media-container img,
.archive article:hover .ct-media-container img {
    transform: scale(1.05);
}

/* HIDE CLUTTER (Meta Data) */
/* Hide Author, Comments, Text Labels */
.ct-meta-element-author,
.ct-meta-element-comments,
.ct-meta-element-read-time,
.ct-meta-label {
    display: none !important;
}

/* Style the Date (Keep it minimal) */
.ct-meta-element-date {
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* Title Styling */
.entry-title {
    font-size: 1.4em;
    font-weight: 700;
    margin: 15px 0;
    line-height: 1.3;
}

.entry-title a {
    text-decoration: none;
    transition: color 0.2s;
}

.entry-title a:hover {
    color: #F05A18 !important;
}

/* Excerpt Styling */
.entry-excerpt {
    font-size: 1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Pushes 'Read More' to bottom */
}

/* Read More Button (Subtle Link) */
.ct-read-more {
    font-size: 0.9em;
    font-weight: 700;
    color: #F05A18 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    /* Stick to bottom */
    display: inline-block;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: border 0.2s;
}

.ct-read-more:hover {
    border-bottom-color: #F05A18;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Remove default button styles from Read More if they exist */
.ct-read-more.button {
    background: transparent !important;
    padding: 0 !important;
}

/* Pagination Styling */
.ct-pagination {
    margin-top: 60px;
}

.ct-pagination .page-numbers {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 1px solid #eee;
    margin: 0 5px;
    transition: all 0.2s;
}

.ct-pagination .page-numbers:hover,
.ct-pagination .page-numbers.current {
    background-color: var(--apex-color) !important;
    color: #ffffff !important;
    border-color: var(--apex-color) !important;
}

/* =========================================
   20. MOBILE HERO TWEAK (Push Content Down)
   ========================================= */
@media (max-width: 768px) {
    .apex-hero {
        min-height: 85vh !important;
        /* Increased from 60vh to 85vh to push next section down */
        /* Keep padding-top to ensure text isn't hidden by header */
        padding-top: 140px !important;
        /* Match header height approx */
    }
}

/* =========================================
   21. MOBILE SPACING FINE TUNE (Pull Text Up)
   ========================================= */
@media (max-width: 768px) {
    .apex-hero {
        padding-top: 100px !important;
        /* Reduced from 140px to pull text up */
    }
}

/* =========================================
   22. CHECKOUT FIX V4 (ATOMIC CSS - NUCLEAR OPTION)
   ========================================= */

/* 1. RESET ALL TPAY & WOO WRAPPERS (TARGET RED BOXES) */
/* Targets every possible container that might have a background */
html body .tpay-pbl-container,
html body .tpay-wrapper,
html body #tpay-payment-form,
html body .payment_box.payment_method_tpaypbl,
html body .payment_box.payment_method_tpaypbl::before,
html body .payment_box.payment_method_tpaypbl::after,
html body div.tpay-container,
html body div.woocommerce-info,
html body div.woocommerce-error,
html body div.woocommerce-message {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 15px 0 !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
    position: relative !important;
}

/* 2. FORCE GRID LAYOUT FOR BANKS */
html body .tpay-banks-list,
html body .gidea-banks-list,
html body div[class*="tpay-banks"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
    margin: 0 !important;
}

/* Mobile Grid Adjustment */
@media (max-width: 768px) {

    html body .tpay-banks-list,
    html body .gidea-banks-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    }
}

/* 3. BANK ITEM STYLING (TILES) */
html body .tpay-item,
html body .tpay-bank-item,
html body div[class*="tpay-item"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100px !important;
    /* Slightly taller */
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    padding: 10px !important;
    cursor: pointer !important;
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 4. SIZING LOGOS (BIGGER) */
html body .tpay-item img,
html body .tpay-bank-item img {
    max-width: 90% !important;
    max-height: 60px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    width: auto !important;
}

/* 5. ACTIVE/HOVER STATES */
html body .tpay-item:hover,
html body .tpay-bank-item:hover {
    border-color: #F05A18 !important;
    /* Apex Orange */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
    background-color: #ffffff !important;
}

html body .tpay-item.active,
html body .tpay-bank-item.selected {
    border-color: #F05A18 !important;
    background-color: #fff5f0 !important;
    box-shadow: 0 0 0 2px #F05A18 !important;
}

/* 6. HIDE ALL TEXT LABELS */
html body .tpay-group-name,
html body .tpay-item-name,
html body .name,
html body span.name {
    display: none !important;
}

/* 7. BLIK MOBILE FIX */
@media (max-width: 768px) {

    html body .tpay-blik-container,
    html body #blik_code,
    html body .tpay-input-wrapper {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

/* 9. REMOVE BLIK FRAME (BLUE BORDER) */
html body .tpay-panel-inside-content,
html body .tpay-channel-form,
html body .tpay-blik-container,
html body .tpay-inside-content,
html body #blik-payment-form {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure Input is still visible but styled cleanly */
html body .tpay-input-blik,
html body #blik_code {
    border: 2px solid #eee !important;
    border-radius: 4px !important;
    padding: 12px !important;
    height: 50px !important;
    font-size: 18px !important;
    text-align: center !important;
    letter-spacing: 2px !important;
    background: #fff !important;
    color: #333 !important;
    width: 100% !important;
    max-width: 200px !important;
    /* Limit width */
    margin-top: 10px !important;
}

html body .tpay-input-blik:focus,
html body #blik_code:focus {
    border-color: #F05A18 !important;
    outline: none !important;
}

/* 8. SHOW MORE BUTTON */
html body .apex-show-more-banks {
    grid-column: 1 / -1;
    padding: 12px;
    background: #f4f4f4;
    color: #555;
    text-align: center;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
    border: 1px solid #ddd;
    width: 100%;
}

html body .apex-show-more-banks:hover {
    background: #e9e9e9;
    color: #16213E;
    /* Apex Navy */
}

/* =========================================
   23. CONTACT PAGE RESTORATION (Standard Apex)
   ========================================= */

#apex-contact-root {
    padding: 60px 0 100px 0;
    width: 100%;
    position: relative;
    background: #ffffff;
}

/* Center Titles */
.apex-contact-title {
    text-align: center;
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 0.3em;
    color: var(--apex-color);
}

.apex-contact-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
}

/* The Grid Container */
.apex-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Info smaller, Form wider */
    gap: 80px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: start;
}

/* Left Col: Info Items */
.apex-contact-info-card {
    padding-top: 20px;
}

.apex-contact-info-card .info-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 45px;
    transition: transform 0.3s ease;
}

.apex-contact-info-card .info-item:hover {
    transform: translateX(10px);
}

.apex-contact-info-card .icon-wrap {
    width: 56px;
    height: 56px;
    background: #f4f7f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apex-color);
    flex-shrink: 0;
    transition: all 0.3s;
}

.apex-contact-info-card .info-item:hover .icon-wrap {
    background: var(--apex-color);
    color: #fff;
    box-shadow: 0 10px 20px rgba(22, 33, 62, 0.2);
}

.apex-contact-info-card .text-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2px;
}

.apex-contact-info-card .label {
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
    font-weight: 600;
}

.apex-contact-info-card .value {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--apex-color);
    text-decoration: none;
    line-height: 1.3;
}

.info-footer p {
    color: #999;
    font-size: 0.9em;
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Right Col: Form Card */
.apex-contact-form-card {
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
    border: 1px solid #f2f2f2;
}

/* WPForms Overrides for "Premium" look */
div.wpforms-container-full .wpforms-form .wpforms-field {
    margin-bottom: 25px !important;
}

div.wpforms-container-full .wpforms-form .wpforms-field-label {
    font-weight: 600 !important;
    color: var(--apex-color) !important;
    margin-bottom: 8px !important;
}

div.wpforms-container-full .wpforms-form input,
div.wpforms-container-full .wpforms-form textarea,
div.wpforms-container-full .wpforms-form select {
    background: #fcfcfc !important;
    border: 2px solid #edeff2 !important;
    border-radius: 10px !important;
    padding: 16px 20px !important;
    transition: all 0.3s !important;
    font-size: 15px !important;
    color: #333 !important;
}

div.wpforms-container-full .wpforms-form input:focus,
div.wpforms-container-full .wpforms-form textarea:focus,
div.wpforms-container-full .wpforms-form select:focus {
    background: #fff !important;
    border-color: var(--apex-color) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06) !important;
}

div.wpforms-container-full .wpforms-form button[type=submit] {
    width: 100%;
    border-radius: 10px !important;
    padding: 18px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-top: 10px !important;
    background: var(--apex-color) !important;
}

div.wpforms-container-full .wpforms-form button[type=submit]:hover {
    background: var(--apex-color-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(22, 33, 62, 0.25) !important;
}

/* --------------------------------------------------------
   MEDIA QUERIES (RESPONSIVE FIXES)
   -------------------------------------------------------- */
@media (max-width: 991px) {
    #apex-contact-root {
        padding: 40px 0 80px 0;
    }

    .apex-contact-grid {
        grid-template-columns: 1fr;
        /* Stack columns */
        gap: 50px;
        max-width: 600px;
    }

    .apex-contact-title {
        font-size: 2.5em;
        line-height: 1.2;
        padding: 0 20px;
    }

    .apex-contact-subtitle {
        padding: 0 20px;
        margin-bottom: 40px;
    }

    .apex-contact-form-card {
        padding: 30px 20px;
    }

    /* NUCLEAR OPTION FOR WPFORMS COLUMNS - FORCE STACK */
    div.wpforms-container-full .wpforms-form .wpforms-field-row {
        display: flex !important;
        flex-direction: column !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    div.wpforms-container-full .wpforms-form .wpforms-field-row:before,
    div.wpforms-container-full .wpforms-form .wpforms-field-row:after {
        display: none !important;
        /* Remove float clears */
    }

    div.wpforms-container-full .wpforms-form .wpforms-one-half,
    div.wpforms-container-full .wpforms-form .wpforms-two-fifths,
    div.wpforms-container-full .wpforms-form .wpforms-three-fifths,
    div.wpforms-container-full .wpforms-form .wpforms-one-third,
    div.wpforms-container-full .wpforms-form .wpforms-two-thirds,
    div.wpforms-container-full .wpforms-form .wpforms-one-fourth,
    div.wpforms-container-full .wpforms-form .wpforms-three-fourths {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        float: none !important;
        clear: both !important;
        display: block !important;
    }

    /* Fix Footer Overlaps */

    /* FINAL MOBILE FIX FOR NAME FIELDS */
    @media (max-width: 991px) {

        div.wpforms-container-full .wpforms-form .wpforms-field-row-block,
        div.wpforms-container-full .wpforms-form .wpforms-one-half {
            width: 100% !important;
            display: block !important;
            margin: 0 0 15px 0 !important;
        }
    }

    /* =========================================
   24. PRODUCT & SHOP PAGE FIXES
   ========================================= */

    /* Fix Header Overlap on Single Product & Shop */
    .single-product #main,
    .post-type-archive-product #main,
    .archive.woocommerce #main {
        padding-top: 160px !important;
        max-width: 1400px;
        margin: 0 auto;
    }

    /* Adjust for Mobile */
    @media (max-width: 991px) {

        .single-product #main,
        .post-type-archive-product #main,
        .archive.woocommerce #main {
            padding-top: 120px !important;
            padding-left: 20px;
            padding-right: 20px;
        }
    }

    /* Fix "Huge" Add to Cart Button on Desktop */
    @media (min-width: 992px) {
        .woocommerce div.product form.cart .button {
            width: auto !important;
            min-width: 200px;
            display: inline-block !important;
        }
    }

    /* =========================================
       25. BREADCRUMB SPECIFIC FIX
       ========================================= */
    @media (min-width: 992px) {

        .single-product .ct-breadcrumbs,
        .post-type-archive-product .ct-breadcrumbs {
            padding-top: 100px !important;
            /* This was nested, now we close it */
            margin-bottom: 20px !important;
        }
    }
}
}

/* Force closing all open blocks */

/* =========================================
   24. PRODUCT & SHOP PAGE FIXES (CORRECTED & CLEANED)
   ========================================= */

/* Fix Header Overlap on Single Product & Shop - DESKTOP DEFAULT */
.single-product #main,
.post-type-archive-product #main,
.archive.woocommerce #main {
    padding-top: 160px !important;
    max-width: 1400px;
    margin: 0 auto;
}

/* Fix "Huge" Add to Cart Button on Desktop */
@media (min-width: 992px) {
    .woocommerce div.product form.cart .button {
        width: auto !important;
        min-width: 200px;
        display: inline-block !important;
    }
}

/* BREADCRUMB SPECIFIC FIX */
@media (min-width: 992px) {

    .single-product .ct-breadcrumbs,
    .post-type-archive-product .ct-breadcrumbs {
        padding-top: 100px !important;
        display: block !important;
        position: relative !important;
        z-index: 5 !important;
        margin-bottom: 20px !important;
    }
}

/* =========================================
   26. FINAL OVERRIDE FOR PRODUCT LAYOUT
   ========================================= */

/* DESKTOP LAYOUT (Large Gap for Fixed Header) */
@media (min-width: 992px) {

    body.single-product #main,
    body.post-type-archive-product #main,
    body.archive.woocommerce #main {
        padding-top: 180px !important;
        margin-top: 50px !important;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }

    .single-product .ct-breadcrumbs,
    .post-type-archive-product .ct-breadcrumbs {
        padding-top: 150px !important;
        display: block !important;
        position: relative !important;
        z-index: 100 !important;
    }
}

/* =========================================
   UNIFORM PRODUCT IMAGES (ALL DEVICES)
   ========================================= */
ul.products li img,
.products li img,
.woocommerce ul.products li.product img,
.products .product img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* =========================================
   FIX CONTACT PAGE HEADER OVERLAP (DESKTOP ONLY)
   ========================================= */
@media (min-width: 992px) {
    body.apex-contact-page #main {
        padding-top: 120px !important;
    }
}

/* =========================================
   HORIZONTAL PAGINATION (ALL DEVICES)
   ========================================= */
.ct-pagination,
nav.ct-pagination,
.ct-pagination ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    list-style: none !important;
    padding: 0 !important;
}

.ct-pagination li,
.ct-pagination a,
.ct-pagination span,
.page-numbers {
    display: inline-flex !important;
    margin: 0 6px !important;
    padding: 10px 18px !important;
    justify-content: center !important;
    align-items: center !important;
    white-space: nowrap !important;
    border-radius: 4px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
}

/* Remove circular shape for text buttons */
.ct-pagination .next,
.ct-pagination .prev,
.ct-pagination a[rel="next"],
.ct-pagination a[rel="prev"] {
    border-radius: 4px !important;
    padding: 10px 14px !important;
    font-size: 0 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Replace text with arrows */
.ct-pagination .next::before,
.ct-pagination a[rel="next"]::before {
    content: "→" !important;
    font-size: 20px !important;
    font-weight: bold !important;
    display: block !important;
    line-height: 1 !important;
}

.ct-pagination .prev::before,
.ct-pagination a[rel="prev"]::before {
    content: "←" !important;
    font-size: 20px !important;
    font-weight: bold !important;
    display: block !important;
    line-height: 1 !important;
}

/* =========================================
   27. NUCLEAR VISIBILITY FIX (FORCE SHOW CONTENT - PRODUCT & SHOP ONLY)
   ========================================= */
@media (max-width: 991px) {

    /* Apply ONLY to Shop, Product Archive, and Single Product pages to avoid breaking Contact/Home */
    .post-type-archive-product #main,
    .tax-product_cat #main,
    .single-product #main,
    .shop #main {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        min-height: auto !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Force remove any padding from breadcrumbs or other elements */
    .post-type-archive-product .ct-breadcrumbs,
    .tax-product_cat .ct-breadcrumbs,
    .shop .ct-breadcrumbs {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Ensure products grid is visible but doesn't override flex/other layouts elsewhere */
    .post-type-archive-product .products,
    .tax-product_cat .products,
    .shop .products {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        /* Prevents overflow */
        gap: 10px !important;
        /* Reduced gap */
        opacity: 1 !important;
        visibility: visible !important;
        margin: 0 auto !important;
        /* Center the grid */
        width: 100% !important;
        padding: 0 !important;
        /* Remove extra padding that might push right */
        box-sizing: border-box !important;
    }

    /* Fix Pagination Logic (Super Robust) */
    .ct-pagination,
    nav.ct-pagination,
    .ct-pagination ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-top: 30px !important;
        padding: 0 !important;
        gap: 8px !important;
        list-style: none !important;
    }

    .ct-pagination>*,
    .ct-pagination ul>*,
    .ct-pagination li,
    .ct-pagination a,
    .ct-pagination span,
    .page-numbers {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 0 !important;
        padding: 5px 10px !important;
        float: none !important;
    }

    /* Uniform product image sizing */
    ul.products li img,
    .products li img,
    .woocommerce ul.products li.product img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

/* =========================================
   ULTRA-AGGRESSIVE SPACING FIX FOR PRODUCT PAGES (MOBILE)
   Overrides parent theme Blocksy + inline styles
   ========================================= */
@media (max-width: 991px) {

    /* Fix #1: Remove header container padding */
    .post-type-archive-product header .ct-container,
    .tax-product_cat header .ct-container,
    .shop header .ct-container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Fix #2: Remove #main padding (from parent theme) */
    .post-type-archive-product #main,
    .tax-product_cat #main,
    .shop #main {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Fix #3: Remove categories wrapper margin (inline style) */
    .apex-mobile-categories-wrapper {
        margin-top: 0 !important;
    }

    /* Fix #4: Remove archive container padding */
    .archive .ct-container {
        padding-top: 0 !important;
    }
}

/* =========================================
   PREMIUM MOBILE CATEGORIES BUTTON & MODAL
   ========================================= */

/* Categories Button - Mobile Only */
@media (max-width: 991px) {
    .apex-categories-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        margin-right: 15px;
        background: #F05A18;
        color: white;
        border: none;
        border-radius: 25px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(240, 90, 24, 0.4);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        vertical-align: middle;
    }

    .apex-categories-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }

    .apex-categories-btn:active {
        transform: translateY(0) scale(0.98);
    }

    .apex-categories-btn svg {
        width: 18px;
        height: 18px;
        stroke-width: 2.5;
    }
}

/* Hide button on desktop */
@media (min-width: 992px) {
    .apex-categories-btn {
        display: none;
    }
}

/* Categories Modal */
.apex-categories-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.apex-categories-modal.active {
    opacity: 1;
    visibility: visible;
}

.apex-categories-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.apex-categories-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(50px) scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apex-categories-modal.active .apex-categories-content {
    transform: translateY(0) scale(1);
}

.apex-categories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #F05A18;
    color: white;
}

.apex-categories-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.apex-categories-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apex-categories-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.apex-categories-close svg {
    color: white;
}

.apex-categories-grid {
    padding: 20px;
    max-height: calc(80vh - 76px);
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.apex-category-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.apex-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.apex-category-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.apex-category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.apex-category-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
}

.apex-category-card:hover .apex-category-image img {
    transform: scale(1.1);
}

.apex-category-info {
    padding: 12px;
    text-align: center;
}

.apex-category-info h3 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.apex-category-count {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

/* Scrollbar styling */
.apex-categories-grid::-webkit-scrollbar {
    width: 6px;
}

.apex-categories-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.apex-categories-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.apex-categories-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}