/* Mobile version - side by side */
.productdisbtn-mobile {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.productdisbtn-mobile a {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    text-align: center;
    white-space: nowrap;
}
/* ====================================================
   MOBILE VIEW FIXES FOR VIHAN MODULAR PRODUCT PAGE
   ==================================================== */

/* Fix for RED ISSUE - Overlapping text in hero section */
@media (max-width: 767.98px) {
    
    .product-main.full-righttext {
        padding: 20px 15px !important;
    }
    
    .product-main.full-righttext h2 {
        font-size: 15px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    
    .product-main.full-righttext p {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }
    
    .product-main.full-righttext img {
        max-width: 120px !important;
        height: auto !important;
        margin-bottom: 10px !important;
    }
}

/* Fix for GREEN ISSUE - Section title font size (too big) */
@media (max-width: 767.98px) {
    .productitle h2 {
        font-size: 14px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
        font-weight: 600 !important;
    }
}

/* Fix for PINK ISSUE - Product grid layout (reduce switch size, adjust to 3 columns) */
@media (max-width: 767.98px) {
    
    /* Make it 3 columns (33.33% each) - which gives 3 items per row */
    .productmodule .row [class*="col-lg-3"],
    .productmodule .row [class*="col-md-3"],
    .productmodule .row .col-lg-3,
    .productmodule .row .col-md-3 {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
        width: 33.333% !important;
        padding: 4px !important;
    }

    /* Reduce product box size */
    .productboxmain {
        margin-bottom: 10px !important;
    }

    .productbox {
        padding: 6px !important;
        min-height: auto !important;
    }

    /* Reduce image height significantly */
    .productbox img {
        max-width: 60% !important;
        height: 80px !important;
        object-fit: contain !important;
    }

    /* Product name - smaller font below image */
    .productboxmain h3 {
        font-size: 9px !important;
        line-height: 1.2 !important;
        margin-top: 4px !important;
        margin-bottom: 2px !important;
        font-weight: 500 !important;
    }

    /* Product code - orange color, smaller font */
    .productboxmain h4 {
        font-size: 8px !important;
        line-height: 1.2 !important;
        margin-bottom: 4px !important;
        color: #ff6b35 !important;
        font-weight: 600 !important;
    }

    /* Remove extra spacing */
    .productmodule .mb-4 {
        margin-bottom: 8px !important;
    }

    /* Adjust product section spacing */
    .productmodule {
        padding: 20px 0 !important;
    }

    .productmodule .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Ensure rows don't overflow */
    .productmodule .row {
        margin-left: -4px !important;
        margin-right: -4px !important;
    }

    /* HR spacing between sections */
    .productmodule hr {
        margin: 12px 0 !important;
    }
}

/* Additional mobile improvements */
@media (max-width: 767.98px) {
    
    /* Breadcrumb adjustments */
    .bread-crumb_d h1 {
        font-size: 16px !important;
    }

    .bread-crumb-in ul {
        font-size: 12px !important;
    }

    /* Top product tabs */
    .product-top-tab {
        font-size: 12px !important;
    }

    /* Modal adjustments for mobile */
    .modal-content.custom-modal {
        margin: 10px !important;
    }

    .modal-header.custom-modal-head h5 {
        font-size: 14px !important;
    }

    .modal-header.custom-modal-head h6 {
        font-size: 12px !important;
    }

    #modalImage {
        max-width: 60% !important;
    }
    
    /* Fix catalogue download buttons */
    .catalogue-buttons,
    .catalog-buttons,
    [class*="catalogue"],
    [class*="catalog"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 20px 15px !important;
    }
    
    .catalogue-buttons > *,
    .catalog-buttons > * {
        flex: 0 0 auto !important;
        min-width: 200px !important;
        max-width: 240px !important;
        margin: 0 auto !important;
    }
    
    /* Stack and center all buttons in flex containers */
    .row .d-flex.justify-content-center {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    .row .d-flex a.btn.rounded-pill {
        width: auto !important;
        max-width: 240px !important;
        margin: 0 auto !important;
    }
}