/* ==================================================================
   AMAJED FINAL RESPONSIVE SAFETY LAYER
   Loaded after page-level CSS so it can safely normalize every public
   view without changing the desktop visual language.
   ================================================================== */

/* ---------------------------------------------------------------
   GLOBAL FLUIDITY / OVERFLOW SAFETY
   --------------------------------------------------------------- */

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

body {
    min-width: 0;
    overflow-x: clip;
}

main,
section,
article,
aside,
header,
footer,
nav,
.container,
.mvc-page-content,
.product-card,
.detail-copy,
.contact-form-card,
.contact-info,
.about-hero-copy,
.factory-hero-copy {
    min-width: 0;
}

img,
video,
canvas,
iframe {
    max-width: 100%;
}

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

h1,
h2,
h3,
h4,
p,
a,
button,
strong,
small,
span {
    overflow-wrap: break-word;
}

.btn {
    max-width: 100%;
}

/* Safe-area support for phones with display cut-outs, especially in
   landscape orientation. */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .mobile-menu {
        padding-left: max(18px, env(safe-area-inset-left));
        padding-right: max(18px, env(safe-area-inset-right));
        padding-bottom: max(26px, env(safe-area-inset-bottom));
    }
}


/* ---------------------------------------------------------------
   LARGE TABLET / SMALL DESKTOP BRIDGE
   --------------------------------------------------------------- */

@media (max-width: 1180px) {
    .split-head,
    .factory-section-head,
    .about-section-head {
        gap: clamp(18px, 3.5vw, 42px);
    }

    .cta-grid {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .product-detail {
        gap: clamp(28px, 4vw, 50px);
    }
}


/* ---------------------------------------------------------------
   TABLET / NARROW LAPTOP
   --------------------------------------------------------------- */

@media (max-width: 1040px) {
    .cta-grid {
        grid-template-columns: 1fr;
    }

    .cta-grid .btn,
    .cta-grid > .btn {
        justify-self: start;
    }

    .contact-info,
    .detail-gallery {
        position: static !important;
        top: auto !important;
    }

    .about-intro-media,
    .about-system-media,
    .factory-overview-media,
    .factory-team-media,
    .home-engineering-media {
        width: 100%;
    }

    .about-intro-media img,
    .about-system-media img,
    .factory-overview-media img,
    .factory-team-media img,
    .home-engineering-media img {
        width: 100%;
    }
}


/* ---------------------------------------------------------------
   PHONE / SMALL TABLET
   --------------------------------------------------------------- */

@media (max-width: 720px) {
    :root {
        --container: calc(100vw - 24px) !important;
    }

    html {
        scroll-padding-top: 78px;
    }

    .container {
        max-width: 100%;
    }

    .section {
        padding-block: clamp(52px, 9vw, 64px) !important;
    }

    .section-sm {
        padding-block: clamp(38px, 7vw, 48px) !important;
    }

    .display {
        font-size: clamp(32px, 9.8vw, 44px) !important;
    }

    body[dir="rtl"] .display {
        font-size: clamp(30px, 9.1vw, 41px) !important;
    }

    .h2 {
        font-size: clamp(26px, 7.5vw, 35px) !important;
    }

    .lede {
        max-width: 100% !important;
        font-size: clamp(13px, 3.6vw, 14.5px) !important;
    }

    .btn {
        min-height: 44px;
    }

    /* Prevent iOS Safari from zooming the viewport when a form field
       receives focus. */
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    textarea {
        font-size: 16px !important;
    }

    .btn {
        white-space: normal;
        text-align: center;
    }

    /* Header */
    .nav {
        width: var(--container);
        grid-template-columns: minmax(88px, 1fr) auto !important;
        gap: 6px !important;
    }

    .brand,
    .nav-actions {
        min-width: 0;
    }

    .brand img {
        width: auto;
        max-width: min(118px, 32vw) !important;
        height: auto !important;
        max-height: 32px;
    }

    .nav-actions {
        display: flex;
        justify-content: flex-end;
        gap: 3px !important;
    }

    .icon-btn,
    .lang-btn,
    .mobile-btn {
        flex: 0 0 36px;
    }

    .mobile-menu {
        width: 100%;
        max-width: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* Generic section heads */
    .split-head,
    .factory-section-head,
    .about-section-head,
    .contact-location-head {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        align-items: start !important;
    }

    .split-head .lede,
    .factory-section-head > .lede,
    .about-section-head > .lede {
        margin: 0;
    }

    /* -------------------------- HOME -------------------------- */
    body[data-page="home"] .hero-slider {
        width: 100%;
        min-height: 100svh !important;
        min-height: 100dvh !important;
    }

    body[data-page="home"] .hero-slider .hero-grid {
        width: var(--container);
        min-width: 0;
    }

    body[data-page="home"] .home-hero-title {
        max-width: 100% !important;
        text-wrap: balance;
    }

    body[data-page="home"] .hero-copy > p {
        max-width: 100% !important;
    }

    .home-category-grid {
        width: 100%;
    }

    .home-category-card,
    .home-category-content,
    .home-category-content > div {
        min-width: 0;
    }

    .home-engineering-card {
        grid-template-columns: 1fr !important;
    }

    .home-engineering-media,
    .home-engineering-media img {
        min-height: 0 !important;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .home-engineering-media img {
        position: absolute;
        inset: 0;
        height: 100% !important;
        aspect-ratio: auto;
    }

    .home-factory-main {
        min-height: clamp(380px, 118vw, 500px) !important;
    }

    .home-factory-tile {
        min-height: clamp(220px, 70vw, 280px) !important;
    }

    .home-factory-process-track {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-factory-step {
        min-width: 0;
        padding-inline: 13px;
    }

    .home-factory-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    /* -------------------------- ABOUT ------------------------- */
    .about-hero {
        min-height: clamp(590px, 88dvh, 720px) !important;
        padding-top: clamp(88px, 15vw, 105px) !important;
        padding-bottom: 42px;
    }

    .about-hero-grid,
    .about-intro-grid,
    .about-system-grid,
    .about-final-grid {
        grid-template-columns: 1fr !important;
        min-width: 0;
    }

    .about-title {
        max-width: 100%;
        font-size: clamp(34px, 9.8vw, 44px) !important;
        text-wrap: balance;
    }

    .about-hero-actions,
    .about-final-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .about-hero-actions .btn,
    .about-final-actions .btn {
        width: 100%;
    }

    .about-intro-media,
    .about-intro-media img,
    .about-system-media,
    .about-system-media img {
        min-height: 0 !important;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .about-intro-media img,
    .about-system-media img {
        position: absolute;
        inset: 0;
        height: 100% !important;
        aspect-ratio: auto;
    }

    .about-factory-card {
        min-height: clamp(390px, 118vw, 520px) !important;
    }

    .about-stainless-stat,
    .about-timeline,
    .about-principles-grid,
    .about-capabilities {
        min-width: 0;
    }

    /* ------------------------- FACTORY ------------------------ */
    .factory-hero {
        min-height: auto !important;
        padding-top: clamp(104px, 17vw, 126px) !important;
        padding-bottom: 34px !important;
    }

    .factory-hero-grid,
    .factory-overview-grid,
    .factory-team-grid,
    .factory-section-head {
        grid-template-columns: 1fr !important;
        width: var(--container);
    }

    .factory-title {
        max-width: 100%;
        font-size: clamp(34px, 9.8vw, 45px) !important;
        text-wrap: balance;
    }

    body[dir="rtl"] .factory-title {
        font-size: clamp(32px, 9.1vw, 42px) !important;
    }

    .factory-hero-panel {
        max-width: 100% !important;
    }

    .factory-capability-strip,
    .factory-stats,
    .factory-process-grid {
        width: var(--container);
        grid-template-columns: 1fr !important;
    }

    .factory-overview-media,
    .factory-overview-media img,
    .factory-team-media,
    .factory-team-media img {
        min-height: 0 !important;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .factory-overview-media img,
    .factory-team-media img {
        position: absolute;
        inset: 0;
        height: 100% !important;
        aspect-ratio: auto;
    }

    .factory-gallery-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: clamp(240px, 74vw, 310px) !important;
    }

    .factory-gallery-card,
    .factory-gallery-card.span-2x2,
    .factory-gallery-card.wide {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    /* ------------------------- CONTACT ------------------------ */
    .contact-hero {
        min-height: 0 !important;
    }

    .contact-hero .inner-hero-grid {
        width: var(--container);
        padding-top: clamp(84px, 15vw, 96px) !important;
        padding-bottom: 42px !important;
    }

    .contact-title {
        max-width: 100%;
        font-size: clamp(34px, 9.8vw, 44px) !important;
        text-wrap: balance;
    }

    .contact-grid,
    .contact-methods,
    .contact-location-head {
        grid-template-columns: 1fr !important;
    }

    .contact-method {
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
    }

    .contact-method strong,
    .contact-location-copy,
    .contact-map-overlay > div {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .contact-form-card {
        width: 100%;
    }

    .contact-map-card {
        min-height: clamp(360px, 112vw, 470px) !important;
    }

    .contact-map-overlay {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .contact-map-overlay .btn {
        width: 100%;
    }

    /* ------------------ CATALOG / PRODUCT --------------------- */
    .catalog-search-panel,
    .category-search-panel,
    .subcat-bar,
    .technical-table-wrap,
    .model-selector,
    .product-detail,
    .detail-gallery,
    .detail-copy {
        max-width: 100%;
        min-width: 0;
    }

    .catalog-search-heading,
    .category-search-heading {
        min-width: 0;
    }

    .catalog-search-form,
    .category-search-box {
        width: 100%;
        min-width: 0;
    }

    .catalog-search-result {
        min-width: 0;
    }

    .catalog-result-copy strong,
    .catalog-result-path {
        max-width: 100%;
    }

    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .product-media {
        height: clamp(210px, 66vw, 250px) !important;
    }

    .detail-main,
    .product-main-visual {
        width: 100%;
        min-height: 0 !important;
        height: clamp(230px, 68vw, 320px) !important;
    }

    .detail-main img,
    .product-main-visual img {
        max-width: 100%;
        max-height: 100%;
    }

    .product-quick-facts,
    .specification-grid,
    .mobile-model-types {
        min-width: 0;
    }

    .technical-table-wrap,
    .model-selector,
    .subcat-scroll,
    .filters {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
    }

    .mobile-model-card,
    .mobile-model-head,
    .mobile-model-specs > div {
        min-width: 0;
    }

    .mobile-model-specs strong {
        max-width: min(190px, 48vw) !important;
        overflow-wrap: anywhere;
    }

    /* ------------------ CART / QUOTATION ---------------------- */
    .cart-drawer {
        width: 100% !important;
        max-width: 100vw;
    }

    .cart-item {
        min-width: 0;
    }

    .cart-item-copy strong,
    .cart-item-copy > span {
        overflow-wrap: anywhere;
    }

    .quotation-modal {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .quotation-dialog {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 12px) !important;
    }

    .quotation-form {
        grid-template-columns: 1fr !important;
    }

    .quotation-channel {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }

    .quotation-channel-copy strong,
    .quotation-channel-copy small {
        overflow-wrap: anywhere;
    }

    /* ----------------------- FOOTER ---------------------------- */
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-social,
    .copyright {
        min-width: 0;
    }

    .copyright {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}


/* ---------------------------------------------------------------
   SMALL PHONES
   --------------------------------------------------------------- */

@media (max-width: 480px) {
    :root {
        --container: calc(100vw - 20px) !important;
    }

    .section {
        padding-block: 50px !important;
    }

    .section-sm {
        padding-block: 36px !important;
    }

    .nav {
        height: 64px !important;
    }

    .mobile-menu {
        inset: 64px 0 0 !important;
    }

    body:not([data-page="home"]) main {
        padding-top: 64px !important;
    }

    .brand img {
        max-width: min(104px, 29vw) !important;
        max-height: 29px;
    }

    .icon-btn,
    .lang-btn,
    .mobile-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        flex-basis: 34px;
    }

    .home-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .home-category-card {
        min-height: 96px !important;
        padding-inline: 4px !important;
    }

    .home-factory-main {
        min-height: clamp(350px, 120vw, 460px) !important;
    }

    .home-factory-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .about-hero-year {
        width: min(180px, 58vw) !important;
    }

    .about-factory-card {
        min-height: clamp(360px, 120vw, 470px) !important;
    }

    .factory-capability-strip > div {
        min-height: 48px;
    }

    .contact-method {
        grid-template-columns: 38px minmax(0, 1fr) auto !important;
        gap: 10px !important;
    }

    .contact-method-icon {
        width: 38px;
        height: 38px;
    }

    .catalog-search-result {
        grid-template-columns: 64px minmax(0, 1fr) !important;
    }

    .catalog-result-arrow {
        display: none !important;
    }

    .mobile-model-types {
        grid-template-columns: 1fr !important;
    }

    .mobile-model-specs > div {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }

    .mobile-model-specs strong {
        max-width: 100% !important;
        text-align: start !important;
    }

    .quotation-channel {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 9px;
        padding-inline: 11px;
    }

    .quotation-channel-icon {
        width: 36px;
        height: 36px;
    }
}


/* ---------------------------------------------------------------
   EXTRA-SMALL PHONES
   --------------------------------------------------------------- */

@media (max-width: 360px) {
    :root {
        --container: calc(100vw - 16px) !important;
    }

    .nav-actions {
        gap: 2px !important;
    }

    .brand img {
        max-width: 92px !important;
    }

    .icon-btn,
    .lang-btn,
    .mobile-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        flex-basis: 32px;
    }

    .home-category-content h3,
    body[dir="rtl"] .home-category-content h3 {
        font-size: 8.8px !important;
    }

    .home-factory-stats {
        grid-template-columns: 1fr !important;
    }

    .about-hero-year {
        display: none;
    }

    .factory-hero-kpis div {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .factory-hero-kpis small {
        text-align: start;
    }

    .quotation-channel-arrow {
        display: none;
    }

    .quotation-channel {
        grid-template-columns: 36px minmax(0, 1fr);
    }
}


/* ---------------------------------------------------------------
   SHORT MOBILE LANDSCAPE
   The main failure mode on phones is not width, but very short height.
   These rules let content grow vertically instead of being clipped by a
   forced 100dvh hero.
   --------------------------------------------------------------- */

@media (max-width: 920px) and (max-height: 560px) and (orientation: landscape) {
    body[data-page="home"] .hero-slider {
        height: auto !important;
        min-height: 100dvh !important;
        max-height: none !important;
    }

    body[data-page="home"] .hero-slider .hero-grid {
        height: auto !important;
        min-height: 100dvh !important;
        padding: 72px 0 42px !important;
        align-content: center !important;
    }

    body[data-page="home"] .home-hero-title {
        font-size: clamp(28px, 5.4vw, 38px) !important;
        margin-bottom: 8px !important;
    }

    body[data-page="home"] .hero-copy > p {
        font-size: 11px !important;
        line-height: 1.45 !important;
        margin-bottom: 6px !important;
    }

    body[data-page="home"] .hero-actions {
        margin-top: 8px !important;
    }

    body[data-page="home"] .hero-actions .btn {
        min-height: 38px !important;
        padding-block: 7px !important;
    }

    .about-hero,
    .factory-hero,
    .contact-hero {
        min-height: auto !important;
    }

    .about-hero {
        padding-top: 82px !important;
        padding-bottom: 32px !important;
    }

    .about-hero-year,
    .factory-hero-panel {
        display: none !important;
    }

    .factory-hero {
        padding-top: 82px !important;
        padding-bottom: 26px !important;
    }

    .factory-capability-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .contact-hero .inner-hero-grid {
        padding-top: 80px !important;
        padding-bottom: 30px !important;
    }

    .about-intro-media,
    .about-system-media,
    .factory-overview-media,
    .factory-team-media,
    .home-engineering-media {
        max-height: 72dvh;
    }
}


/* ---------------------------------------------------------------
   REDUCED MOTION
   --------------------------------------------------------------- */

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


/* ======================================================================
   HOME — FINAL COMPOSITION FIX
   2026-08: Arabic main hero + full Project Engineering image
   ----------------------------------------------------------------------
   Goals:
   1) Keep the first Arabic hero kitchen composition visible instead of
      sacrificing large parts of the source image to wide-screen cropping.
   2) Never crop the Project Engineering source image on any viewport.
   3) Preserve the existing English hero and the rest of the responsive
      system unchanged.
   ====================================================================== */

/* ----------------------------------------------------------------------
   ARABIC MAIN HERO — DESKTOP / LANDSCAPE TABLET
   The first source image is 16:9. `contain` keeps the complete kitchen in
   frame. On ultra-wide screens the unused area becomes intentional dark
   copy space on the right, which is where RTL content lives.
   ---------------------------------------------------------------------- */
@media (min-width: 901px) {
    body[dir="rtl"][data-page="home"] .hero-slide:nth-child(1) {
        transform: none !important;
    }

    body[dir="rtl"][data-page="home"] .hero-slide:nth-child(1) img {
        object-fit: contain !important;
        object-position: left center !important;
        background: #020a10;
    }

    body[dir="rtl"][data-page="home"] .hero-slider::after {
        background:
            linear-gradient(
                270deg,
                rgba(1, 8, 14, .96) 0%,
                rgba(1, 8, 14, .86) 30%,
                rgba(1, 8, 14, .58) 49%,
                rgba(1, 8, 14, .18) 70%,
                rgba(1, 8, 14, .22) 100%
            ),
            linear-gradient(
                0deg,
                rgba(1, 8, 14, .66),
                transparent 56%
            ) !important;
    }

    body[dir="rtl"][data-page="home"] .hero-slider .hero-grid {
        grid-template-columns:
            minmax(0, clamp(590px, 43vw, 720px))
            minmax(150px, 1fr) !important;
        gap: clamp(24px, 3.4vw, 54px) !important;
    }

    body[dir="rtl"][data-page="home"] .hero-copy {
        width: 100%;
        max-width: 700px !important;
    }

    body[dir="rtl"][data-page="home"] .home-hero-title {
        max-width: 700px !important;
        font-size: clamp(
            42px,
            min(3.45vw, 6.2vh),
            64px
        ) !important;
        text-wrap: balance;
    }

    body[dir="rtl"][data-page="home"] .hero-copy > p {
        max-width: 620px !important;
    }
}

/* Short laptops: keep the Arabic copy compact without covering the visual. */
@media (min-width: 901px) and (max-height: 700px) {
    body[dir="rtl"][data-page="home"] .hero-slider .hero-grid {
        grid-template-columns:
            minmax(0, clamp(520px, 42vw, 650px))
            minmax(140px, 1fr) !important;
        padding-top: 80px !important;
        padding-bottom: 44px !important;
    }

    body[dir="rtl"][data-page="home"] .home-hero-title {
        max-width: 650px !important;
        font-size: clamp(36px, min(3.2vw, 6.6vh), 52px) !important;
        margin-bottom: 10px !important;
    }

    body[dir="rtl"][data-page="home"] .hero-copy > p {
        max-width: 590px !important;
        font-size: clamp(11.5px, .92vw, 14px) !important;
        line-height: 1.62 !important;
    }
}

/* Mobile portrait still uses cover so the hero remains immersive, but the
   focal point is shifted to retain the working kitchen rather than an edge. */
@media (max-width: 900px) {
    body[dir="rtl"][data-page="home"] .hero-slide:nth-child(1) img {
        object-fit: cover !important;
        object-position: 38% 50% !important;
    }
}

/* Landscape phones have enough horizontal space to show the complete source
   without making the kitchen tiny. */
@media (max-width: 900px) and (orientation: landscape) {
    body[dir="rtl"][data-page="home"] .hero-slide:nth-child(1) img {
        object-fit: contain !important;
        object-position: left center !important;
        background: #020a10;
    }
}


/* ----------------------------------------------------------------------
   PROJECT ENGINEERING — FULL SOURCE IMAGE, ZERO CROP
   Source ratio: 1389 / 1132.
   ---------------------------------------------------------------------- */
.home-engineering-card {
    min-height: 0 !important;
    grid-template-columns:
        minmax(0, 1.08fr)
        minmax(360px, .92fr) !important;
    align-items: stretch;
}

.home-engineering-media {
    width: 100%;
    min-width: 0;
    min-height: 0 !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #06131c;
}

.home-engineering-media img {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0;
    min-height: 0 !important;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
}

.home-engineering-card:hover .home-engineering-media img {
    transform: none !important;
}

/* Stacked engineering card: lock the media box to the real source ratio so
   there is no crop and no artificial fixed height on tablets / phones. */
@media (max-width: 1040px) {
    .home-engineering-card {
        grid-template-columns: 1fr !important;
    }

    .home-engineering-media {
        height: auto !important;
        aspect-ratio: 1389 / 1132 !important;
    }

    .home-engineering-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
}

@media (max-width: 720px) {
    .home-engineering-card {
        border-radius: clamp(18px, 5vw, 22px) !important;
    }

    .home-engineering-media {
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: 1389 / 1132 !important;
    }

    .home-engineering-media img {
        position: static !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        object-fit: contain !important;
    }
}

@media (max-width: 1040px) {
    .home-engineering-media {
        max-height: none !important;
    }
}


/* ======================================================================
   PRODUCTS MEGA MENU — DESKTOP FIT + DEEP-LINK UPDATE
   Keeps all six mega-menu columns inside the viewport on wide laptops and
   medium desktop screens. Mobile continues to use the dedicated menu.
   ====================================================================== */

@media (min-width: 1221px) {
    .mega > .container {
        width: min(1440px, calc(100vw - 40px)) !important;
        max-width: min(1440px, calc(100vw - 40px)) !important;
    }

    .mega-grid {
        grid-template-columns:
            minmax(210px, 1.15fr)
            repeat(5, minmax(0, 1fr)) !important;
        gap: clamp(14px, 1.45vw, 24px) !important;
    }

    .mega-grid > div,
    .mega-highlight,
    .mega-intro {
        min-width: 0;
    }

    .mega h4,
    .mega a,
    .mega p {
        overflow-wrap: anywhere;
    }
}

@media (min-width: 1221px) and (max-width: 1480px) {
    .mega-grid {
        grid-template-columns:
            minmax(190px, 1.08fr)
            repeat(5, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    .mega-intro {
        padding-right: 18px !important;
    }

    body[dir="rtl"] .mega-intro {
        padding-right: 0 !important;
        padding-left: 18px !important;
    }

    .mega h4 {
        font-size: 13px;
    }

    .mega a,
    .mega p {
        font-size: 12px;
    }
}

/* ==================================================================
   2026-09-08 PUBLIC IMAGE RESPONSIVE AUDIT
   Final image-safety layer for current Home / About / Factory /
   Contact / Catalog / Careers / Cold Rooms views.
   ================================================================== */

/* Ordinary content images should never force horizontal overflow.
   Cover/contain media below keep their own explicit heights. */
picture,
figure {
    max-width: 100%;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}


/* ---------------------------------------------------------------
   TABLET / MOBILE IMAGE NORMALIZATION
   --------------------------------------------------------------- */

@media (max-width: 720px) {

    /* HOME HERO
       Lock the reviewed mobile crop here in the final responsive layer
       so older site.css crop rules cannot win accidentally. */
    body[data-page="home"] .hero-slide img {
        width: 100%;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
    }

    body[data-page="home"] .hero-slide:nth-child(1) img {
        object-position: 42% 50% !important;
    }

    body[data-page="home"] .hero-slide:nth-child(2) img {
        object-position: 40% 50% !important;
    }

    body[data-page="home"] .hero-slide:nth-child(3) img {
        object-position: 40% 50% !important;
    }

    body[data-page="home"] .hero-slide:nth-child(4) img {
        object-position: 42% 50% !important;
    }


    /* HOME — full-bleed photographic panels */
    .home-factory-main img,
    .home-factory-tile img,
    .story-media img {
        width: 100% !important;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
    }

    .home-factory-main img {
        object-position: 58% center !important;
    }

    /* Product/reference imagery must remain fully visible rather than
       being cropped as photography. */
    .integrated-image .integrated-media img,
    .hero-product-card .premium-product-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
    }


    /* ABOUT */
    .about-hero-media img {
        width: 100%;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
    }

    .about-intro-media img,
    .about-system-media img {
        width: 100% !important;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
    }

    .about-factory-card > img {
        width: 100% !important;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
    }


    /* FACTORY */
    .factory-hero-media img,
    .factory-overview-media img,
    .factory-team-media img,
    .factory-gallery-card img,
    .factory-cta-media img {
        width: 100% !important;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
    }


    /* CAREERS */
    .careers-hero-media img {
        width: 100%;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
        object-position: center !important;
    }


    /* COLD ROOMS */
    .cr-hero-media img,
    .cr-project-grid img {
        width: 100% !important;
        height: 100% !important;
        max-width: none;
        object-fit: cover !important;
    }

    .cr-project-grid figure {
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 4 / 3;
    }

    .cr-word-master-figure,
    .cr-word-item {
        max-width: 100%;
        overflow: hidden;
    }

    .cr-word-master-figure img,
    .cr-word-item img {
        width: 100%;
        max-width: 100%;
    }


    /* CATALOG / PRODUCT
       Stainless/product cut-outs should never be cropped on phones. */
    .product-media img,
    .detail-main img,
    .product-main-visual img,
    .product-v2-main-visual > img,
    .product-v2-thumb img,
    .thumb img,
    .cart-item-media img {
        max-width: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
    }

    .product-v2-main-visual > img {
        width: 100% !important;
        height: 100% !important;
        padding: clamp(12px, 4vw, 20px) !important;
    }
}


/* ---------------------------------------------------------------
   SMALL PHONES
   --------------------------------------------------------------- */

@media (max-width: 480px) {

    /* Keep Home hero focal points stable on narrow phones rather than
       allowing the older 29–32% site.css crop rules to reappear. */
    body[data-page="home"] .hero-slide:nth-child(1) img {
        object-position: 42% 50% !important;
    }

    body[data-page="home"] .hero-slide:nth-child(2) img {
        object-position: 40% 50% !important;
    }

    body[data-page="home"] .hero-slide:nth-child(3) img {
        object-position: 40% 50% !important;
    }

    body[data-page="home"] .hero-slide:nth-child(4) img {
        object-position: 42% 50% !important;
    }

    .cr-project-grid figure {
        aspect-ratio: 1 / 1;
    }
}


/* ---------------------------------------------------------------
   EXTRA-SMALL PHONES
   --------------------------------------------------------------- */

@media (max-width: 360px) {

    .home-engineering-media,
    .about-intro-media,
    .about-system-media,
    .factory-overview-media,
    .factory-team-media {
        aspect-ratio: 1 / 1 !important;
    }

    .product-v2-main-visual > img {
        padding: 10px !important;
    }
}
