/* ======================================
   MOBILE: SHOW ONLY CARD, IMAGE, PRODUCT STACKED
   ====================================== */
@media screen and (max-width: 640px) {
    body {
        overflow-x: hidden;
    }
    /* Hide all unnecessary sections */
    .item-description-details > :not(.product-display),
    .item-recommendation-section,
    .item-industries,
    .item-standards,
    .item-img,
    .item-img1,
    .item-image2,
    .details-label {
        display: none !important;
    }
    /* Show the name wrapper */
    .item-name-wrapper {
        display: block !important;
        width: 100% !important;
        text-align: center;
        margin: 0 auto;
        position: relative; /* for positioning over card if needed */
    }

    /* Move name over card info */
    .item-name-wrapper .item-name {
        position: relative; /* or absolute if you want overlap */
        top: 460px; /* adjust this to move the name down onto card */
        left: 250px;
        right: 0;
        margin: 0 auto;
        font-size: 3rem;
        font-weight: bold;
        text-align: center;
    }
    /* Stack everything vertically */
    .item-detail-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: -140px;
        width: 100% !important;
        margin: 0 auto !important;
        align-items: center;
    }
    /* Card info full width */
    .item-info {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center;
        box-sizing: border-box;
    }

    /* Main image full width */
    .item-image {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .item-image img {
        width: 100% !important;
        height: auto !important;
        display: block;
        margin: 0 auto;
    }
}
@media screen and (max-width: 640px) {
    /* Ensure product-display shows above everything else */
    .product-display {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin: 0 auto !important;
        position: relative; /* enable offset */
        top: -90px; /* move it upwards */
    }

    /* Optional: adjust spacing inside product-display */
    .product-display p {
        margin-bottom: 10px;
    }

    /* Make sure flex stacking doesn't interfere */
    .item-detail-grid,
    .item-description-details {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        gap: 20px;
    }
}
@media screen and (max-width: 640px) {
    .item-packaging {
        display: block !important;
        width: 100% !important;
        max-width: 640px;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        position: relative;
        top: 950px;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    .item-packaging > * {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
    }

    .item-packaging table {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        table-layout: fixed;
        border-collapse: collapse;
    }
}
@media screen and (max-width: 640px) {
    /* Make table vertical WITHOUT shifting container */
    .item-packaging thead {
        display: none !important;
    }

    .item-packaging tbody {
        display: block !important;
        width: 100% !important;
    }

    .item-packaging tr {
        display: block !important;
        width: 100% !important;
        margin-bottom: 16px;
        border: 1px solid #ddd;
        padding: 12px;
        box-sizing: border-box;
        background: #fff;
    }

    .item-packaging td {
        display: block !important;
        width: 100% !important;
        padding: 6px 0;
        text-align: left;
        font-size: 14px;
        word-break: break-word;
        border-bottom: 1px solid #eee;
    }

    .item-packaging td:last-child {
        border-bottom: none;
    }

    /* Optional labels if present */
    .item-packaging td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
    }
}
