.tr-stock-in {
    display: none !important;
}

/* Force hidden on desktop */
.facebook-wrapper-mobile-only {
    display: none !important;
}

/* Mobile Language Switcher - Compact Green Buttons */
.mobile-lang-switcher {
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    /* Prevent block width */
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    margin-right: 0 !important;
    /* Ensure no external push */
}

.header-right-group {
    display: flex !important;
    flex-direction: row !important;
    /* Force row */
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    /* Prevent text wrap */
    gap: 15px !important;
    /* Clear gap */
    margin-left: auto !important;
    margin-right: 15px !important;
    padding-right: 0 !important;
    max-width: none !important;
    width: auto !important;
    /* Ensure it doesn't span full width */
    z-index: 10020 !important;
}

.cart-btn {
    color: #558030 !important;
    /* Force Green */
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    font-size: 28px !important;
    margin: 0 !important;
    /* Reset margin, rely on gap */
    flex-shrink: 0 !important;
    /* PREVENT SQUISHING */
    /* Slightly larger than switcher */
    overflow: visible !important;
}

/* Ensure switcher doesn't shrink or overlap */
.mobile-lang-switcher {
    flex-shrink: 0 !important;
    margin-right: 0 !important;
}

.cart-btn i {
    color: #558030 !important;
    font-size: 28px !important;
    display: inline-block !important;
    visibility: visible !important;
    z-index: 10010 !important;
}

.cart-badge {
    position: absolute !important;
    top: -4px !important;
    right: -6px !important;
    background-color: #ff0000 !important;
    color: white !important;
    border-radius: 50% !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    min-width: 14px !important;
    height: 14px !important;
    line-height: 14px !important;
    text-align: center !important;
    display: none;
    /* JS will show it */
    z-index: 10020 !important;
}

.mobile-lang-switcher {
    float: none !important;
}

/* Prevent logo overlap - Compact Version */
.logo-mobile {
    max-width: 80px !important;
    /* Reduced from 140px */
    overflow: hidden !important;
    white-space: nowrap !important;
    z-index: 10001 !important;
}

.logo-mobile img {
    max-height: 35px !important;
    /* Slightly shorter */
    width: auto !important;
    max-width: 100% !important;
}

/* Compact Switcher to fit between Logo and Cart */
.mobile-lang-switcher a {
    padding: 2px 4px !important;
    font-size: 12px !important;
    /* Smaller text */
    margin: 0 1px !important;
}

/* Re-applying switcher container styles properly */
.mobile-lang-switcher {
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    height: auto !important;
    float: none !important;
    margin: 0 !important;
    margin-right: 10px !important;
    /* Reduced from 40px */
    gap: 0 !important;
    flex-shrink: 0 !important;
}

.mobile-lang-switcher * {
    position: static !important;
    /* Kill any absolute positioning */
    float: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.mobile-lang-switcher br {
    display: none !important;
}

/* Mobile Switcher Logic: Show only button for OPPOSITE language */
.mobile-lang-switcher {
    font-size: 0 !important;
    /* Hide separator text */
}

/* Hide active language (text) */
.mobile-lang-switcher span {
    display: none !important;
}

/* Show inactive language (link) as a button */
.mobile-lang-switcher a {
    font-size: 12px !important;
    /* Restore font size */
    display: inline-block !important;
    background: #4A702B !important;
    color: #fff !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    /* Full rounded corners */
    text-decoration: none !important;
    border: 1px solid #5a8533 !important;
    font-weight: bold !important;
    margin: 0 !important;
    min-width: 24px !important;
    text-align: center !important;
}

/* Remove group styling since we only show one button */
.mobile-lang-switcher a:first-child,
.mobile-lang-switcher span:first-child {
    border-radius: 4px !important;
    border-right: 1px solid #5a8533 !important;
    padding-left: 10px !important;
}

.mobile-lang-switcher a:last-child,
.mobile-lang-switcher span:last-child {
    border-radius: 4px !important;
    padding-right: 10px !important;
}

/* Green "Add to Cart" button for products */
.p-buy,
a.p-buy,
.commodity .p-buy {
    background: #4A702B !important;
    border: 1px solid #5a8533 !important;
    color: #fff !important;
    padding: 12px 24px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
}

.p-buy:hover,
a.p-buy:hover {
    background: #5a8533 !important;
}

/* Mobile optimizations */
@media screen and (max-width: 1000px) {

    /* RESET SCROLLBARS - SIMPLEST APPROACH */
    html {
        overflow-x: hidden !important;
        /* Let the browser handle vertical scroll naturally */
        height: auto !important;
        width: 100% !important;
    }

    body {
        overflow-x: hidden !important;
        /* No fixed heights */
        height: auto !important;
        min-height: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }

    /* FORCE LOGO SIZE VIA CSS */
    .logo-mobile img {
        height: 40px !important;
        width: auto !important;
        max-width: 180px !important;
        display: block !important;
    }

    /* Mobile header */
    .mobile-header-premium {
        margin: 0 !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
        width: 100% !important;
        /* Use % not vw to avoid scrollbar width issues */
        box-sizing: border-box !important;
    }

    /* Content Holder */
    .content_holder {
        margin: 0 !important;
        padding: 0 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Footer Fix - Grey and Standard with Overflow Protection */
    .footer {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px 10px !important;
        margin: 0 !important;
        text-align: center !important;
        background: #e6e6e6 !important;
        border-top: 1px solid #ccc !important;
        float: none !important;
        display: block !important;
        position: relative !important;
        /* Ensure it contains children */
        height: auto !important;
        /* Let it grow */
        min-height: auto !important;
    }

    /* Reset absolute positioning from desktop styles involving .btmenu and .copy */
    .footer .btmenu,
    .footer .copy {
        position: static !important;
        /* Disable absolute positioning */
        left: auto !important;
        top: auto !important;
        margin: 0 auto !important;
        /* Center block */
        transform: none !important;
        float: none !important;
        width: 100% !important;
        text-align: center !important;
    }

    .footer .btmenu {
        display: block !important;
        margin-bottom: 15px !important;
        padding: 0 !important;
    }

    .footer .btmenu a {
        display: inline-block !important;
        color: #14790F !important;
        text-decoration: underline !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        text-transform: uppercase !important;
        padding: 5px 8px !important;
        border: none !important;
        background: transparent !important;
        margin: 0 2px !important;
        width: auto !important;
        max-width: none !important;
        white-space: normal !important;
        /* Allow text wrapping */
    }

    .footer .btmenu a:hover {
        color: #d00000 !important;
        text-decoration: none !important;
        border: none !important;
    }

    .footer .copy {
        font-size: 12px !important;
        color: #666 !important;
        line-height: 1.5 !important;
        padding: 0 10px !important;
    }

    /* Word wrapping for all text elements */
    .content_holder,
    .content_holder *,
    .mainframe,
    .mainframe *,
    p,
    div,
    span,
    a,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        max-width: 100% !important;
    }

    /* Images and media */
    img,
    video {
        max-width: 100% !important;
        height: auto !important;
    }

    /* iFrames - fix Facebook widget scrollbar */
    iframe {
        max-width: 100% !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Tables */
    table {
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
    }

    /* Remove spacing on all block elements */
    .content_holder *,
    .mainframe,
    .mainframe *,
    .mn_annotation,
    .videoplayer,
    .mfr_holder,
    .mna_holder,
    .dmy,
    .article,
    .article_holder,
    .commodity,
    .commodity_holder,
    .page_content,
    h1 {
        margin-top: 17px !important;
        max-width: 100% !important;
        padding-bottom: 10px !important;
    }

    h2,
    h3 {
        margin-top: 10px !important;
        max-width: 100% !important;
    }

    /* Special fix for first elements - allow h1 to have its margin */
    .content_holder>*:first-child:not(h1),
    .mainframe>*:first-child:not(h1),
    .mfr_holder>*:first-child:not(h1) {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Remove excessive side padding from main containers */
    .mfrhld_mn,
    .content_box,
    .dmy {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Fix article date layout: Stack title and date vertically */
    #news_head h2,
    #news_date {
        float: none !important;
        width: 100% !important;
        display: block !important;
        margin-right: 0 !important;
    }

    #news_date {
        text-align: right !important;
        margin-top: 5px !important;
        margin-bottom: 10px !important;
    }

    /* Hide duplicate/old Facebook widget wrapper */
    .comments_box {
        display: none !important;
    }

    /* Fix mobile product grid: Force 1 column */
    .gds_item {
        width: 100% !important;
        float: none !important;
        height: auto !important;
    }

    /* Cart Badge - Red Circle */
    .cart-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background-color: #ff0000;
        color: white;
        border-radius: 50%;
        padding: 2px 5px;
        font-size: 11px;
        font-weight: bold;
        min-width: 16px;
        text-align: center;
        line-height: normal;
        display: none;
        /* Hidden by default until JS shows it */
        z-index: 100 !important;
    }

    .cart-btn i {
        z-index: 1 !important;
        position: relative !important;
    }

    /* Cart Page Layout: Vertical Stack */
    .basket_form,
    .basket_items {
        width: 100% !important;
        float: none !important;
        display: block !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding-bottom: 20px !important;
    }

    /* Fix input widths in basket form */
    .basket_form input,
    .basket_form textarea,
    .basket_form select,
    .basket_form .cl_necessary,
    .basket_form .cl_basket_field {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-right: 0 !important;
    }

    /* Fix table display in basket items (prevent squishing) */
    .basket_items table {
        width: 100% !important;
        display: table !important;
        /* Restore table behavior if possible, or keep block if needed */
    }

    .cl_basket_com_table td,
    .cl_basket_com_table th {
        word-break: normal !important;
        /* Allow normal text flow */
    }

    /* Facebook Widget Fix: Prevent overlap with Footer */
    .facebook-wrapper-mobile-only,
    .facebook-wrapper {
        clear: both !important;
        display: block !important;
        position: relative !important;
        float: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 500px !important;
        margin-bottom: 150px !important;
        /* Large margin to push footer down */
        padding-bottom: 40px !important;
        overflow: hidden !important;
        z-index: 1 !important;
    }

    .footer {
        clear: both !important;
        margin-top: 20px !important;
        padding-top: 30px !important;
        position: relative !important;
        z-index: 10 !important;
        /* Ensure it stays on top */
        background: #e6e6e6 !important;
        /* Ensure background covers any underlap */
    }

    /* Product Page Buy Block - Row Layout */
    .inline_buy {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        width: 100% !important;
        margin-top: 10px !important;
    }

    .inline_buy .left-controls {
        text-align: left !important;
        flex: 1 !important;
        width: auto !important;
        display: block !important;
    }

    .inline_buy .right-controls {
        text-align: right !important;
        flex: 0 0 auto !important;
        width: auto !important;
        display: block !important;
    }

    .inline_buy .price {
        margin-bottom: 0 !important;
        text-align: left !important;
    }

    .buy-btn,
    .buy-btn-disabled {
        padding: 10px 20px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }

}