/**
 * Product SEO layout shell — standalone desktop PDP (no feed dashboard sidebar).
 */

/* موبایل: قفل viewport — بدون اسکرول صفحه / زوم اشتباه (layout جدید product-seo) */
@media (max-width: 767.98px) {
    html:has(body.rewall-pdp-reels.product-seo-page) {
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        height: 100%;
        height: 100dvh;
    }

    body.product-seo-page.rewall-pdp-reels {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 0 !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        touch-action: manipulation;
        -webkit-text-size-adjust: 100%;
    }

    body.rewall-pdp-reels .product-seo-app {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.rewall-pdp-reels .rewall-pdp-mobile-root {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        overflow: hidden;
        z-index: 1;
    }

    body.rewall-pdp-reels .product-seo-app > .d-none.d-md-block,
    body.rewall-pdp-reels .feed-desk-footer,
    body.rewall-pdp-reels .footer-desktop,
    body.rewall-pdp-reels .rewall-pdp-mobile-header {
        display: none !important;
    }

    /* toast / offcanvas بیرون از ریل — نباید عرض صفحه را باز کنند */
    body.rewall-pdp-reels .offcanvas,
    body.rewall-pdp-reels #product-detail {
        max-width: 100vw;
    }
}

@media (min-width: 768px) {
    body.product-seo-page {
        max-width: 100%;
        margin: 0;
    }

    body.product-seo-page .app {
        max-width: 100%;
        width: 100%;
    }
}

.product-desktop-feed-shell {
    width: 100%;
    max-width: min(1180px, 100%);
    margin-inline: auto;
    min-height: auto;
    overflow: visible;
}

.product-desktop-feed-shell .desktop-container {
    max-width: 100%;
    margin: 0;
    padding-inline: 0;
    padding-top: 0;
}

.product-desktop-feed-shell .pd-store__shell {
    border-radius: 16px;
}

.product-desktop-feed-shell .pd-store__media {
    top: 8px;
}

.product-desktop-feed-shell .rewall-product-discovery-wrap {
    max-width: 100% !important;
    overflow: visible;
    padding-bottom: 8px;
}

@media (min-width: 768px) and (max-width: 1040px) {
    .product-desktop-feed-shell .pd-store__grid {
        grid-template-columns: 1fr;
    }

    .product-desktop-feed-shell .pd-store__media {
        position: relative;
        top: auto;
    }
}
