/* ==========================================================================
   TechSoftGroups - Native Mobile App-Like Styling & Responsive Overrides
   Designed to give an ultra-premium, fluid eCommerce App experience on Mobile
   ========================================================================== */

/* Mobile Bottom Navigation Bar (App Bar) */
.ts-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    padding: 6px 12px;
}

.ts-mobile-nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
}

.ts-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    position: relative;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.ts-mobile-nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
    transition: var(--transition);
}

.ts-mobile-nav-item.active, .ts-mobile-nav-item:hover {
    color: var(--primary);
}
.ts-mobile-nav-item.active i {
    transform: translateY(-2px);
    color: var(--primary);
}

.ts-mobile-nav-badge {
    position: absolute;
    top: 0px;
    right: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid #fff;
}

/* Mobile Category Pills Horizontal Scroll */
.ts-mobile-cat-scroll {
    display: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px 16px;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ts-mobile-cat-scroll::-webkit-scrollbar {
    display: none;
}
.ts-mobile-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    flex-shrink: 0;
}
.ts-mobile-cat-pill i {
    color: var(--primary);
}
.ts-mobile-cat-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.ts-mobile-cat-pill.active i {
    color: #fff;
}

/* Mobile Sticky Product Action Bar */
.ts-mobile-pdp-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    padding: 10px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ts-mobile-pdp-price-wrap {
    display: flex;
    flex-direction: column;
}
.ts-mobile-pdp-price-wrap .price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}
.ts-mobile-pdp-price-wrap .mrp {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
}
.ts-mobile-pdp-btns {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .ts-topbar { display: none; }
    .ts-navbar { display: none; }
    
    .ts-header-inner {
        padding: 8px 0;
        gap: 12px;
    }
    .ts-logo img {
        height: 44px;
        max-height: 46px;
    }
    
    .ts-hero-grid {
        grid-template-columns: 1fr;
    }
    .ts-side-categories {
        display: none;
    }
    .ts-hero-slider-wrapper,
    .ts-hero-slider-track {
        min-height: 520px;
    }
    .ts-hero-slide {
        padding: 28px 20px 48px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
        justify-content: center;
    }
    .ts-hero-content {
        max-width: 100%;
    }
    .ts-hero-title {
        font-size: 22px;
        white-space: normal;
    }
    .ts-hero-desc {
        font-size: 14px;
        margin-bottom: 16px;
    }
    .ts-hero-btns {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .ts-hero-image-wrapper {
        max-width: 240px;
    }
    .ts-hero-img-card {
        padding: 10px;
        transform: none !important;
    }
    .ts-hero-img-card img {
        max-height: 160px;
    }
    .ts-slider-nav {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    .ts-slider-prev { left: 8px; }
    .ts-slider-next { right: 8px; }
    .ts-slider-pagination {
        left: 50%;
        transform: translateX(-50%);
        bottom: 12px;
    }
    
    .ts-trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ts-trust-card {
        padding: 12px;
    }
    
    .ts-section-header {
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }
    .ts-section-title-wrap h2 {
        font-size: 20px;
    }

    .ts-category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .ts-cat-card {
        padding: 10px 8px;
    }
    .ts-cat-img-box {
        width: 100%;
        height: 85px;
        margin-bottom: 8px;
        border-radius: var(--radius-sm);
        overflow: hidden;
    }
    .ts-cat-img-box img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center;
        margin: auto;
    }
    .ts-cat-name {
        font-size: 12px;
    }

    .ts-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ts-product-card {
        border-radius: var(--radius-sm);
    }
    .ts-product-top-bar {
        padding: 8px 10px 2px 10px;
        min-height: 36px;
    }
    .ts-product-badge-group {
        gap: 4px;
    }
    .ts-product-discount-tag,
    .ts-product-badge-group .badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    .ts-product-img-wrapper {
        height: 165px;
        padding: 10px 8px;
        background: #FFFFFF;
    }
    .ts-product-img-wrapper img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center;
        margin: auto;
    }
    .ts-product-body {
        padding: 10px;
    }
    .ts-product-title {
        font-size: 13px;
        height: 36px;
    }
    .ts-product-price {
        font-size: 16px;
    }
    .ts-product-footer-btns .ts-btn-buy-now {
        display: none;
    }
    .ts-product-action-btns {
        opacity: 1;
        transform: translateX(0);
    }

    .ts-solutions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ts-brand-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .ts-b2b-strip {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px;
    }

    .ts-pdp-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 20px;
    }
    .ts-pdp-main-img-box {
        height: 260px;
    }
    .ts-pdp-info h1 {
        font-size: 20px;
    }

    .ts-ft-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ts-ft-offices-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ts-ft-offices-hdr-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .ts-ft-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .ts-ft-trust-badges {
        justify-content: center;
    }

    /* Show App Navigation & Bottom Bar */
    .ts-mobile-bottom-nav {
        display: block;
    }
    .ts-mobile-cat-scroll {
        display: flex;
    }
    .ts-mobile-pdp-sticky-bar {
        display: flex;
    }
    
    /* Body Bottom padding so sticky bar does not cover content */
    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 576px) {
    .ts-header-actions .ts-action-text {
        display: none;
    }
    .ts-header-actions {
        gap: 10px;
    }
    .ts-search-category {
        display: none;
    }
    .ts-trust-grid {
        grid-template-columns: 1fr;
    }
    .ts-solutions-grid {
        grid-template-columns: 1fr;
    }
    .ts-brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ts-review-grid {
        grid-template-columns: 1fr !important;
    }
    .ts-review-form-card {
        padding: 16px !important;
    }
    .ts-toast {
        min-width: calc(100vw - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        font-size: 13px !important;
        padding: 10px 16px !important;
    }
    #tsCompareFilterForm {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 992px) {
    #tsCompareFilterForm {
        grid-template-columns: 1fr 1fr !important;
    }
    .ts-maps-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ts-ft-top-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ts-ft-offices-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .ts-maps-grid {
        grid-template-columns: 1fr;
    }
    .ts-ft-top-grid {
        grid-template-columns: 1fr;
    }
    .ts-ft-offices-grid {
        grid-template-columns: 1fr;
    }
    .ts-ft-bottom-inner {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .ts-ft-trust-badges {
        justify-content: center;
    }
    .ts-floating-whatsapp {
        bottom: 82px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    .ts-blog-grid,
    .ts-blog-grid-4col {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ts-blog-carousel-slide {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .ts-blog-img-box {
        height: 190px;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    .ts-blog-carousel-slide {
        flex: 0 0 calc((100% - 24px) / 2) !important;
        max-width: calc((100% - 24px) / 2) !important;
    }
    .ts-blog-grid-4col {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 18px;
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .ts-blog-grid-4col {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
}

/* ==========================================================================
   Responsive Rules for Blog & Whitepaper Detail Page
   ========================================================================== */

@media (max-width: 992px) {
    .ts-article-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .ts-sticky-sidebar-container {
        position: static;
    }
    .ts-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .ts-article-page-wrapper {
        padding: 20px 0 60px;
    }
    .ts-article-hero-header {
        padding: 22px 18px;
        margin-bottom: 20px;
    }
    .ts-article-hero-title {
        font-size: 22px;
        line-height: 1.35;
        margin-bottom: 16px;
    }
    .ts-article-meta-capsule {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding-top: 16px;
    }
    .ts-meta-stats-group {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 12px;
    }
    .ts-article-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .ts-article-sheet {
        padding: 22px 18px;
    }
    .ts-article-featured-media {
        border-radius: 10px;
        margin-bottom: 22px;
    }
    .ts-featured-img {
        max-height: 260px;
    }
    .ts-takeaways-box {
        padding: 18px 16px;
        margin-bottom: 26px;
    }
    .ts-takeaways-title {
        gap: 10px;
    }
    .ts-takeaways-title h3 {
        font-size: 15px;
    }
    .ts-takeaways-list li {
        font-size: 13px;
    }
    .ts-lead-text {
        font-size: 15px;
        line-height: 1.75;
    }
    .ts-article-body-content p {
        font-size: 14.5px;
        line-height: 1.75;
    }
    .ts-article-body-content h2 {
        font-size: 18px;
        margin: 28px 0 12px;
    }
    .ts-author-bio-card {
        flex-direction: column;
        padding: 20px 16px;
        gap: 16px;
    }
    .ts-article-share-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .ts-share-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .ts-share-social-btns {
        flex-wrap: wrap;
        width: 100%;
    }
    .ts-share-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }
    .ts-back-guides-btn {
        width: 100%;
        justify-content: center;
    }
    .ts-related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ts-related-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}





