/*
 * M/S Babu Enterprise - Complete responsive layer
 * Loaded after every page-specific stylesheet so public pages stay usable
 * from 320px phones through tablets, laptops and large displays.
 */

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

main,
section,
header,
footer,
nav,
.container,
.container-fluid,
.row,
[class*="col-"] {
    min-width: 0;
}

img,
picture,
svg,
canvas,
video,
iframe,
object,
embed {
    max-width: 100%;
}

img,
video {
    height: auto;
}

iframe {
    border: 0;
}

p,
li,
a,
button,
label,
strong,
small,
span,
h1,
h2,
h3,
h4,
h5,
h6,
td,
th {
    overflow-wrap: anywhere;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.section-padding {
    padding-block: clamp(3.25rem, 7vw, 7rem);
}

.page-hero .container,
.page-hero-small .container {
    padding-inline: clamp(.9rem, 4vw, 2rem);
}

.page-hero h1,
.page-hero-small h1 {
    font-size: clamp(2rem, 7vw, 4rem);
    line-height: 1.12;
    text-wrap: balance;
}

.page-hero p,
.page-hero-small p {
    max-width: 760px;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    text-wrap: balance;
}

.form-control,
.form-select,
.input-group-text,
.btn {
    min-height: 44px;
}

.form-control,
.form-select,
textarea.form-control {
    font-size: 16px;
}

.btn {
    white-space: normal;
    line-height: 1.3;
}

/* Header and mobile navigation */
.navbar {
    --bs-navbar-padding-y: .45rem;
}

.navbar .container {
    gap: .65rem;
}

.navbar-brand {
    min-width: 0;
    max-width: calc(100% - 64px);
}

.navbar-brand > span {
    min-width: 0;
}

.brand-logo {
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-name,
.brand-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-subtitle {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.navbar-toggler {
    flex: 0 0 auto;
    min-width: 46px;
    min-height: 46px;
    border-radius: 12px;
}

.navbar-collapse {
    min-width: 0;
}

/* Generic cards and grids */
.solution-card,
.spare-part-card,
.value-card,
.form-card,
.filter-panel,
.contact-methods,
.business-person-card,
.compare-picker,
.cta-box,
.home-spare-card,
.feature-box,
.partner-card,
.about-image-wrap {
    min-width: 0;
}

.solution-image-wrap,
.solution-image-wrap-large,
.spare-part-image,
.home-spare-card img {
    overflow: hidden;
}

.solution-card img,
.spare-part-card img,
.home-spare-card img {
    width: 100%;
}

.product-card-specs,
.spare-part-meta,
.hero-points,
.category-filters {
    min-width: 0;
}

/* Catalogue filters and floating compare */
.category-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding: .15rem .05rem .55rem;
    margin-bottom: -.3rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.category-filters .filter-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.compare-floating-bar {
    max-width: calc(100vw - 2rem);
}

.compare-table-wrap {
    border-radius: 18px;
}

.compare-table {
    min-width: 760px;
}

.compare-table th,
.compare-table td {
    vertical-align: top;
}

.compare-table thead img {
    width: clamp(110px, 18vw, 180px);
    height: clamp(95px, 15vw, 150px);
    object-fit: contain;
}

/* Contact and footer */
.contact-methods a,
.contact-methods > div {
    min-width: 0;
}

.contact-methods strong,
.footer-contact a,
.footer-contact span {
    word-break: break-word;
}

.site-footer .row > * {
    min-width: 0;
}

.footer-logo {
    flex: 0 0 auto;
    object-fit: contain;
}

.whatsapp-float,
.back-to-top {
    z-index: 1040;
}

/* Homepage industrial design: fluid sizing and safe positioning */
.home-industrial .industrial-hero,
.home-industrial .featured-machines-section,
.home-industrial .production-process-section,
.home-industrial .machine-showcase-section,
.home-industrial .spare-parts-industrial-section,
.home-industrial .company-story-section,
.home-industrial .partner-industrial-section,
.home-industrial .final-industrial-cta {
    isolation: isolate;
}

.home-industrial .industrial-hero__title,
.home-industrial .industrial-section-title {
    text-wrap: balance;
}

.home-industrial .industrial-hero__title {
    font-size: clamp(2.35rem, 5.4vw, 5.25rem);
}

.home-industrial .industrial-section-title {
    font-size: clamp(2rem, 4.2vw, 4rem);
}

.home-industrial .industrial-hero__lead,
.home-industrial .industrial-section-copy {
    font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.home-industrial .industrial-hero__actions,
.home-industrial .final-industrial-cta__actions {
    max-width: 100%;
}

.home-industrial .hero-machine-stage,
.home-industrial .hero-machine-card,
.home-industrial .company-story-visual,
.home-industrial .partner-industrial-card,
.home-industrial .final-industrial-cta__box {
    max-width: 100%;
}

.home-industrial .hero-machine-card__image,
.home-industrial .industrial-product-card__media img,
.home-industrial .machine-showcase-tile img,
.home-industrial .spare-glass-card__image img,
.home-industrial .company-story-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-industrial .hero-machine-card__meta,
.home-industrial .industrial-product-card__footer,
.home-industrial .partner-industrial-grid,
.home-industrial .process-grid,
.home-industrial .machine-showcase-grid,
.home-industrial .company-feature-list {
    min-width: 0;
}

.home-industrial .technology-marquee {
    overflow: hidden;
}

/* Product page responsive safety */
.product-industrial-page .pfx-product-layout,
.product-industrial-page .pfx-product-main,
.product-industrial-page .pfx-gallery-panel,
.product-industrial-page .pfx-summary-panel,
.product-industrial-page .pfx-category-sidebar,
.product-industrial-page .pfx-inquiry-shell,
.product-industrial-page .pfx-related-card,
.product-industrial-page .commerce-product-gallery,
.product-industrial-page .commerce-gallery-viewer {
    min-width: 0;
    max-width: 100%;
}

.product-industrial-page .pfx-section-nav-inner,
.product-industrial-page .commerce-gallery-thumbs {
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.product-industrial-page .pfx-summary-panel h1,
.product-industrial-page .pfx-summary-panel h2,
.product-industrial-page .pfx-section-heading h2 {
    text-wrap: balance;
}

.product-industrial-page .commerce-gallery-viewer iframe,
.product-industrial-page .commerce-gallery-viewer video,
.product-industrial-page .commerce-gallery-main-image {
    width: 100%;
    max-width: 100%;
}

.product-industrial-page .pfx-spec-table-wrap,
.product-industrial-page .suote-spec-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.product-industrial-page .pfx-document-card,
.product-industrial-page .pfx-feature-card,
.product-industrial-page .pfx-related-card {
    min-width: 0;
}

/* Tablet and smaller */
@media (max-width: 991.98px) {
    .container,
    .container-fluid {
        --bs-gutter-x: 1.5rem;
    }

    .navbar .container {
        padding-block: .45rem !important;
    }

    .navbar-collapse {
        margin-top: .75rem;
        padding: .7rem;
        border: 1px solid rgba(15, 40, 68, .1);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 18px 42px rgba(15, 40, 68, .12);
        max-height: calc(100dvh - 98px);
        overflow-y: auto;
    }

    .navbar-nav {
        align-items: stretch !important;
        gap: .25rem !important;
    }

    .navbar-nav .nav-link {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: .7rem .85rem;
        border-radius: 12px;
    }

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link:hover {
        background: rgba(8, 104, 200, .08);
    }

    .navbar-nav .nav-item.ms-lg-2 {
        margin-top: .4rem;
    }

    .navbar-nav .btn {
        width: 100%;
        min-height: 48px;
    }

    .page-hero .container,
    .page-hero-small .container {
        padding-block: 3.5rem !important;
    }

    .filter-panel {
        padding: 1rem;
    }

    .spare-parts-intro {
        grid-template-columns: 1fr !important;
    }

    .compare-floating-bar {
        left: 1rem;
        right: 1rem;
        bottom: calc(1rem + env(safe-area-inset-bottom));
        transform: none;
        width: auto;
    }

    .home-industrial .industrial-hero__row {
        min-height: auto;
    }

    .home-industrial .hero-machine-stage {
        margin-inline: auto;
    }

    .home-industrial .hero-floating-note {
        max-width: min(230px, 48vw);
    }

    .home-industrial .process-grid,
    .home-industrial .partner-industrial-grid,
    .home-industrial .company-feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-industrial .machine-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-industrial .machine-showcase-tile--1,
    .home-industrial .machine-showcase-tile--4 {
        grid-column: auto;
        grid-row: auto;
    }

    .product-industrial-page .pfx-product-layout {
        grid-template-columns: 1fr !important;
    }

    .product-industrial-page .pfx-category-sidebar {
        position: static !important;
        top: auto !important;
    }

    .product-industrial-page .pfx-category-toggle {
        display: flex;
    }

    .product-industrial-page .pfx-category-panel {
        display: none;
    }

    .product-industrial-page .pfx-category-panel.show,
    .product-industrial-page .pfx-category-sidebar.is-open .pfx-category-panel {
        display: block;
    }

    .product-industrial-page .pfx-section-nav-inner {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .product-industrial-page .pfx-section-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .product-industrial-page .pfx-document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phones */
@media (max-width: 767.98px) {
    body {
        font-size: 15.5px;
    }

    .container,
    .container-fluid {
        --bs-gutter-x: 1.15rem;
    }

    .brand-logo {
        width: 44px !important;
        height: 44px !important;
    }

    .brand-name {
        font-size: .94rem;
        line-height: 1.15;
    }

    .brand-subtitle {
        max-width: 210px;
        font-size: .67rem;
        line-height: 1.2;
    }

    .section-padding {
        padding-block: 3.4rem;
    }

    .page-hero .container,
    .page-hero-small .container {
        padding-block: 3rem !important;
    }

    .eyebrow {
        font-size: .72rem;
        letter-spacing: .08em;
    }

    .display-4,
    .display-5,
    .display-6 {
        line-height: 1.16;
    }

    .btn-lg {
        padding: .72rem 1rem;
        font-size: 1rem;
    }

    .filter-panel {
        margin-bottom: 2rem !important;
        border-radius: 18px;
    }

    .filter-panel .input-group-lg > .form-control,
    .filter-panel .input-group-lg > .input-group-text,
    .filter-panel .form-select-lg {
        font-size: 16px;
        min-height: 50px;
    }

    .category-filters {
        margin-inline: -.15rem;
    }

    .solution-card,
    .spare-part-card,
    .value-card,
    .form-card,
    .cta-box {
        border-radius: 18px;
    }

    .solution-card,
    .spare-part-body,
    .form-card,
    .value-card {
        padding: 1rem;
    }

    .solution-image-wrap-large {
        min-height: 220px;
    }

    .solution-card h3,
    .spare-part-card h2 {
        font-size: 1.2rem !important;
    }

    .product-card-specs,
    .spare-part-meta {
        gap: .5rem;
    }

    .solution-card .d-flex.gap-2.mt-auto,
    .spare-part-card .d-flex.gap-2.mt-auto {
        display: grid !important;
        grid-template-columns: 1fr auto;
    }

    .compare-picker {
        padding: 1rem;
    }

    .compare-table {
        min-width: 680px;
        font-size: .82rem;
    }

    .compare-table th,
    .compare-table td {
        padding: .65rem;
    }

    .compare-floating-bar {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: .75rem;
        padding: .85rem;
        border-radius: 16px;
    }

    .compare-floating-bar > div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }

    .compare-floating-bar .btn {
        width: 100%;
    }

    .contact-methods a,
    .contact-methods > div {
        align-items: flex-start;
        padding: .95rem;
    }

    .business-person-card {
        align-items: center;
    }

    .business-person-card img {
        width: 58px;
        height: 58px;
    }

    .about-image-wrap .about-badge {
        position: static;
        width: 100%;
        margin-top: .85rem;
    }

    .site-footer {
        text-align: left;
    }

    .footer-bottom {
        text-align: center;
    }

    .whatsapp-float {
        right: .8rem;
        bottom: calc(.8rem + env(safe-area-inset-bottom));
        width: 52px;
        height: 52px;
    }

    .back-to-top {
        right: .8rem;
        bottom: calc(4.7rem + env(safe-area-inset-bottom));
    }

    .home-industrial .industrial-hero {
        min-height: auto;
        padding-block: 4rem 3.25rem;
    }

    .home-industrial .hero-copy-panel {
        text-align: left;
    }

    .home-industrial .industrial-hero__actions,
    .home-industrial .final-industrial-cta__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .home-industrial .industrial-btn,
    .home-industrial .industrial-outline-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .home-industrial .hero-trust-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: .65rem;
    }

    .home-industrial .hero-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-industrial .hero-stat {
        padding-inline: .4rem;
    }

    .home-industrial .hero-stat strong {
        font-size: clamp(1.3rem, 7vw, 2rem);
    }

    .home-industrial .hero-machine-stage {
        min-height: 420px;
    }

    .home-industrial .hero-machine-card {
        min-height: 430px;
    }

    .home-industrial .hero-floating-note {
        position: relative;
        inset: auto !important;
        width: 100%;
        max-width: none;
        margin-top: .7rem;
        animation: none;
    }

    .home-industrial .hero-machine-stage__gear,
    .home-industrial .hero-machine-stage__orbit,
    .home-industrial .hero-scroll-cue {
        display: none;
    }

    .home-industrial .industrial-section {
        padding-block: 4.25rem;
    }

    .home-industrial .process-grid,
    .home-industrial .partner-industrial-grid,
    .home-industrial .company-feature-list,
    .home-industrial .machine-showcase-grid {
        grid-template-columns: 1fr;
    }

    .home-industrial .machine-showcase-tile {
        min-height: 300px;
    }

    .home-industrial .industrial-product-card__media {
        height: 230px;
    }

    .home-industrial .industrial-product-card__body,
    .home-industrial .spare-glass-card,
    .home-industrial .process-card,
    .home-industrial .partner-industrial-card {
        padding: 1rem;
    }

    .home-industrial .company-story-visual {
        min-height: 320px;
    }

    .home-industrial .company-story-visual__badge {
        position: static;
        width: 100%;
        margin-top: .8rem;
    }

    .home-industrial .final-industrial-cta__box {
        padding: 1.35rem;
        border-radius: 22px;
    }

    .product-industrial-page .pfx-hero {
        padding-block: 3.4rem 2.75rem;
    }

    .product-industrial-page .pfx-breadcrumb {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        padding-bottom: .35rem;
    }

    .product-industrial-page .pfx-hero-copy h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .product-industrial-page .pfx-hero-tags {
        display: grid;
        grid-template-columns: 1fr;
    }

    .product-industrial-page .pfx-hero-tags span {
        width: 100%;
        justify-content: center;
    }

    .product-industrial-page .pfx-hero-stats {
        grid-template-columns: 1fr;
    }

    .product-industrial-page .pfx-gallery-panel,
    .product-industrial-page .pfx-summary-panel,
    .product-industrial-page .pfx-category-sidebar,
    .product-industrial-page .pfx-inquiry-shell {
        border-radius: 18px;
    }

    .product-industrial-page .pfx-gallery-panel,
    .product-industrial-page .pfx-summary-panel {
        padding: 1rem;
    }

    .product-industrial-page .commerce-product-gallery {
        min-height: auto !important;
    }

    .product-industrial-page .commerce-gallery-viewer {
        min-height: 310px !important;
        padding: 3.2rem .75rem 2.4rem !important;
    }

    .product-industrial-page .commerce-gallery-main-image {
        height: auto !important;
        max-height: 265px !important;
        object-fit: contain;
    }

    .product-industrial-page .commerce-gallery-viewer iframe,
    .product-industrial-page .commerce-gallery-viewer video {
        min-height: 250px !important;
        max-height: 310px;
    }

    .product-industrial-page .commerce-gallery-thumbs {
        gap: .45rem;
    }

    .product-industrial-page .commerce-gallery-thumb {
        flex-basis: 64px !important;
        width: 64px !important;
        height: 64px !important;
    }

    .product-industrial-page .pfx-summary-panel h2 {
        font-size: clamp(1.65rem, 7vw, 2.15rem);
    }

    .product-industrial-page .pfx-primary-actions,
    .product-industrial-page .pfx-quick-specs,
    .product-industrial-page .pfx-feature-grid,
    .product-industrial-page .pfx-document-grid,
    .product-industrial-page .pfx-tech-grid,
    .product-industrial-page .pfx-trust-grid {
        grid-template-columns: 1fr !important;
    }

    .product-industrial-page .pfx-primary-actions .btn {
        width: 100%;
    }

    .product-industrial-page .pfx-section-nav {
        top: 64px;
    }

    .product-industrial-page .pfx-section-nav a {
        padding: .82rem .75rem;
        font-size: .78rem;
    }

    .product-industrial-page .pfx-story-section,
    .product-industrial-page .pfx-spec-section,
    .product-industrial-page .pfx-feature-section,
    .product-industrial-page .pfx-document-section,
    .product-industrial-page .pfx-inquiry-section,
    .product-industrial-page .pfx-related-section {
        padding-block: 3.7rem;
    }

    .product-industrial-page .pfx-story-visual {
        min-height: 280px;
    }

    .product-industrial-page .pfx-story-badge {
        position: static;
        width: 100%;
        margin-top: .85rem;
    }

    .product-industrial-page .pfx-spec-table,
    .product-industrial-page .pfx-spec-table tbody,
    .product-industrial-page .pfx-spec-table tr,
    .product-industrial-page .pfx-spec-table th,
    .product-industrial-page .pfx-spec-table td {
        display: block;
        width: 100%;
    }

    .product-industrial-page .pfx-spec-table tr {
        padding: .8rem 1rem;
        border-bottom: 1px solid #e4ebf1;
    }

    .product-industrial-page .pfx-spec-table th,
    .product-industrial-page .pfx-spec-table td {
        padding: .2rem 0;
        border: 0;
        background: transparent;
    }

    .product-industrial-page .pfx-document-card {
        min-height: auto;
    }

    .product-industrial-page .pfx-document-actions {
        grid-template-columns: 1fr 1fr;
    }

    .product-industrial-page .pfx-inquiry-copy,
    .product-industrial-page .pfx-inquiry-form {
        padding: 1rem;
    }

    .product-industrial-page .pfx-related-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-industrial-page .pfx-mobile-actions,
    .product-industrial-page .mobile-product-actions {
        padding-bottom: calc(.65rem + env(safe-area-inset-bottom));
    }

    .product-industrial-page ~ .whatsapp-float,
    .product-industrial-page ~ .back-to-top,
    body.product-industrial-page .whatsapp-float,
    body.product-industrial-page .back-to-top {
        display: none !important;
    }
}

/* Very small phones */
@media (max-width: 575.98px) {
    .navbar-brand {
        max-width: calc(100% - 56px);
    }

    .brand-subtitle {
        max-width: 170px;
    }

    .page-hero .btn,
    .page-hero-small .btn,
    .cta-box .btn,
    .spare-parts-hero .btn {
        width: 100%;
    }

    .solution-card .d-flex.gap-2.mt-auto,
    .spare-part-card .d-flex.gap-2.mt-auto {
        grid-template-columns: 1fr 52px;
    }

    .form-card {
        padding: .9rem;
    }

    .contact-methods i {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
    }

    .footer-logo {
        width: 52px !important;
    }

    .home-industrial .hero-stat-grid {
        grid-template-columns: 1fr;
    }

    .home-industrial .hero-stat {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .home-industrial .hero-stat span {
        margin-top: 0;
    }

    .home-industrial .hero-machine-stage,
    .home-industrial .hero-machine-card {
        min-height: 360px;
    }

    .home-industrial .hero-machine-card__image-wrap {
        min-height: 210px;
    }

    .home-industrial .machine-showcase-tile {
        min-height: 255px;
    }

    .home-industrial .industrial-product-card__media {
        height: 210px;
    }

    .product-industrial-page .pfx-document-actions {
        grid-template-columns: 1fr;
    }

    .product-industrial-page .pfx-mobile-actions,
    .product-industrial-page .mobile-product-actions {
        gap: .45rem;
    }

    .product-industrial-page .pfx-mobile-actions .btn,
    .product-industrial-page .mobile-product-actions .btn {
        padding-inline: .45rem;
        font-size: .78rem;
    }
}

@media (max-width: 399.98px) {
    .container,
    .container-fluid {
        --bs-gutter-x: .9rem;
    }

    .brand-logo {
        width: 40px !important;
        height: 40px !important;
    }

    .brand-name {
        font-size: .84rem;
    }

    .brand-subtitle {
        display: none;
    }

    .navbar-toggler {
        min-width: 42px;
        min-height: 42px;
        padding: .35rem .55rem;
    }

    .category-filters .filter-btn {
        font-size: .78rem;
        padding: .55rem .75rem;
    }

    .compare-floating-bar > div:last-child {
        grid-template-columns: 1fr;
    }

    .home-industrial .industrial-hero__title {
        font-size: 2.15rem;
    }

    .product-industrial-page .commerce-gallery-viewer {
        min-height: 280px !important;
    }

    .product-industrial-page .commerce-gallery-main-image {
        max-height: 225px !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .filter-btn,
    .commerce-gallery-thumb,
    .pfx-section-nav a {
        touch-action: manipulation;
    }

    .solution-card:hover,
    .spare-part-card:hover,
    .industrial-product-card:hover,
    .pfx-related-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
}
