/**
 * TOGS Core Master Fixes & Stylesheet
 * Ensures all visual, layout, and functional fixes are automatically applied site-wide.
 */

/* 1. Zero-Crop Centered Product Images */
.togs-product-img-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    background-color: #efefef !important;
    overflow: hidden !important;
    padding: 1.25rem !important;
}

.togs-product-img-box a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.togs-product-img-box img,
article.group .togs-product-img-box img {
    max-height: 84% !important;
    max-width: 84% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: auto !important;
}

/* 2. Quote Modal: Top Offset & Never Below Sticky Header */
#togs-quote-modal,
[data-q-modal],
.togs-quote-modal-wrap {
    z-index: 9999999 !important;
    padding-top: max(85px, 9vh) !important;
}

#togs-quote-modal>div,
[data-q-modal]>div {
    z-index: 10000000 !important;
}

/* 3. Floating Action Buttons (WhatsApp & Chatbot / Contact) */
.togs-float-actions {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: flex-end !important;
}

.togs-float-btn {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.togs-float-btn:hover {
    transform: scale(1.08) !important;
}

/* 4. Single Product Dynamic Gallery: Prevent empty space if no gallery */
.togs-gallery-empty {
    display: none !important;
}

/* 5. Product Gallery Slider Carousel */
.togs-gallery-slider-wrap {
    position: relative !important;
    width: 100% !important;
}

.togs-gallery-track {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    padding: 4px 2px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    cursor: grab !important;
}

.togs-gallery-track::-webkit-scrollbar {
    display: none !important;
}

.togs-gallery-track.active {
    cursor: grabbing !important;
}

.togs-thumb-slide {
    flex-shrink: 0 !important;
    width: 5.5rem !important;
    height: 5.5rem !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    background-color: #efefef !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
}

@media (min-width: 640px) {
    .togs-thumb-slide {
        width: 6.25rem !important;
        height: 6.25rem !important;
    }
}

.togs-thumb-slide:hover {
    transform: translateY(-2px) !important;
}

.togs-thumb-slide[aria-current="true"] {
    border-color: #f26522 !important;
    box-shadow: 0 0 0 2px rgba(242, 101, 34, 0.25) !important;
}

.togs-slider-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 25 !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(15, 43, 72, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #0f2b48 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.togs-slider-btn:hover {
    background-color: #ffffff !important;
    color: #f26522 !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(15, 43, 72, 0.18) !important;
}

.togs-slider-prev {
    left: -0.75rem !important;
}

.togs-slider-next {
    right: -0.75rem !important;
}

/* 6. Universal Navigation Dropdown Styles (Hover & Click for any WordPress menu items) */
.togs-nav-item,
[data-menu-wrap] {
    position: relative !important;
}

.togs-nav-item:hover>.togs-dropdown-menu,
.togs-nav-item.is-open>.togs-dropdown-menu,
[data-menu-wrap]:hover>[data-dropdown],
[data-menu-wrap]:hover>[data-dropdown].js-hidden,
[data-menu-wrap].is-open>[data-dropdown],
[data-menu-wrap].is-open>[data-dropdown].js-hidden {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
}

/* Hide Home Page Blog Section Whitepaper Button */
#blogs button[data-a="quote"][data-v*="Whitepaper"],
section#blogs .md\:flex-row>button[data-a="quote"] {
    display: none !important;
}

.togs-nav-item:hover [data-chev],
.togs-nav-item.is-open [data-chev],
[data-menu-wrap]:hover [data-chev],
[data-menu-wrap].is-open [data-chev] {
    transform: rotate(180deg) !important;
    color: #f26522 !important;
}

.togs-dropdown-menu,
[data-dropdown] {
    transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.togs-dropdown-menu [role="menu"],
[data-dropdown] [role="menu"] {
    min-width: 16rem !important;
    background-color: #ffffff !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 25px -5px rgba(15, 43, 72, 0.15), 0 8px 10px -6px rgba(15, 43, 72, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    overflow: hidden !important;
}

.togs-dropdown-menu [role="menuitem"],
.togs-dropdown-menu a,
[data-dropdown] [role="menuitem"],
[data-dropdown] a {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    padding: 0.65rem 1.15rem !important;
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

.togs-dropdown-menu [role="menuitem"]:hover,
.togs-dropdown-menu a:hover,
[data-dropdown] [role="menuitem"]:hover,
[data-dropdown] a:hover {
    background-color: #f8fafc !important;
    color: #f26522 !important;
}