/* Internal pages only: Home and its shared widgets keep their existing styles. */
body.inner-page {
    overflow-x: clip;
}

/* Reserve scrollbar space instead of adding a fixed 45px to locked pages. */
@supports (scrollbar-gutter: stable) {
    html:has(> body.inner-page) {
        scrollbar-gutter: stable;
    }
    body.inner-page {
        --smc-page-side-padding: 30px;
        --smc-header-side-padding: 30px;
    }
    body.inner-page:is(.overhide, .lg-on, .modal-open) {
        padding-right: var(--smc-page-side-padding) !important;
    }
    body.inner-page:is(.overhide, .lg-on) .header-main {
        padding-right: var(--smc-header-side-padding);
    }
    .inner-page .product-share-modal {
        padding-inline: 0 !important;
    }
    @media (min-width: 1200px) and (max-width: 1500px), (min-width: 650px) and (max-width: 1024px) {
        body.inner-page {
            --smc-page-side-padding: 15px;
            --smc-header-side-padding: 15px;
        }
    }
    @media (max-width: 640px) {
        body.inner-page {
            --smc-page-side-padding: 0px;
            --smc-header-side-padding: 10px;
        }
    }
}

/* Internal headers stay in document flow, so need no fixed-header spacer. */
body.inner-page:has(> .header-main.not-fixed) {
    padding-top: 0;
}

.inner-page .tab-contents > [id][data-anchor] {
    scroll-margin-top: var(--product-anchor-offset, 110px);
}

/* Keep gallery controls and images above navigation, including mobile footer. */
body.inner-page .lg-container {
    position: relative;
    z-index: 10000002;
}

.inner-page .resp-megamenu:not(.show) {
    visibility: hidden;
}

.inner-page .content-main :is(.row > *, .product-detail-wrapper > *, .head-resault > *) {
    min-width: 0;
}

.inner-page .sec-breadcrumb .breadcrumb {
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.inner-page .list-products-gohar .item-product-gohar {
    display: flex;
    margin-bottom: 24px;
}

.inner-page .content-main .box-product-gohar {
    width: 100%;
    height: auto;
    min-height: 0;
    gap: 18px;
    margin-bottom: 0;
    padding: 20px;
}

.inner-page .content-main .box-product-gohar .image {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    flex-shrink: 0;
}

.inner-page .content-main .box-product-gohar .image > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inner-page .content-main .box-product-gohar .secondary-image {
    position: absolute;
    inset: 0;
    opacity: 0;
}

@media (hover: hover) {
    .inner-page .content-main .box-product-gohar.has-secondary-image:hover .primary-image {
        opacity: 0;
    }
    .inner-page .content-main .box-product-gohar.has-secondary-image:hover .secondary-image {
        opacity: 1;
    }
}

.inner-page .content-main .box-product-gohar .content {
    height: auto;
    flex: 1;
}

.inner-page .content-main .box-product-gohar .content .title {
    margin: 0;
}

.inner-page .content-main .box-product-gohar .content .title a {
    display: block;
    font-size: 16px;
    line-height: 1.9;
    overflow-wrap: anywhere;
    margin: 0;
}

.inner-page .content-main .box-product-gohar .options {
    margin-top: auto;
    gap: 12px;
    flex-wrap: wrap;
}

.inner-page .content-main .box-product-gohar .pr-number {
    font-size: 24px;
}

.inner-page .tab-similar .swiper-slide {
    height: auto;
    display: flex;
    padding-bottom: 20px;
}

.inner-page .group-description {
    background: var(--whitecolor);
    border-radius: 24px;
    padding: 28px;
    margin: 32px 0;
}

.inner-page .content-main .rich-content {
    overflow-wrap: anywhere;
    line-height: 2;
}

.inner-page .content-main .rich-content :is(h1, h2, h3, h4) {
    line-height: 1.7;
    margin: 24px 0 12px;
}

.inner-page .content-main .rich-content :is(p, ul, ol) {
    line-height: 2;
    margin: 0 0 16px;
}

.inner-page .content-main .rich-content :is(ul, ol) {
    padding-inline-start: 24px;
}

.inner-page .content-main .rich-content img {
    max-width: 100%;
    height: auto;
}

.inner-page .content-main .rich-content :is(table, pre) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.inner-page .content-main .rich-content :is(th, td) {
    padding: 10px;
    border: 1px solid #e5e7eb;
}

.inner-page .pagination {
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
}

.inner-page .pagination .page-item .page-link {
    margin: 0;
    min-width: 40px;
}

.inner-page :is(.btn-copy-product-link, .show-on-map) {
    background: var(--maincolor);
    color: var(--whitecolor);
    border-radius: 12px;
    padding: 12px 20px;
}

.inner-page .modal-content {
    border-radius: 20px;
}

.inner-page .modal-header {
    gap: 16px;
}

.inner-page .modal-header .btn-close {
    margin: 0 auto 0 0;
}

.inner-page .product-share-status {
    min-height: 24px;
}

.inner-page .sec-contact-goharnahal .box-map {
    height: auto;
    overflow: hidden;
}

.inner-page .box-map #map {
    min-height: 320px;
    border-radius: 20px;
    background: #f3f5f6;
}

.inner-page .box-map .show-on-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    position: static;
}

.inner-page #contactus label {
    display: block;
    margin-bottom: 8px;
}

.inner-page .map-load-status:empty {
    display: none;
}

.inner-page .product-box.steps-list,
.inner-page .product-box.order-products {
    border-radius: 20px;
}

.inner-page .product-count .count-options .cn {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.inner-page .content-main .name-product {
    line-height: 1.9;
}

.inner-page .content-main :is(a, button, input, select, textarea):focus-visible,
.inner-page .modal :is(button, input):focus-visible {
    outline: 2px solid var(--maincolor) !important;
    outline-offset: 3px;
}

@media (max-width: 991.98px) {
    body.inner-page {
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }
    body.inner-page.smc-filters-open {
        overflow: hidden;
    }
    .inner-page .sec-search-products .sidebar-filter {
        width: 100%;
        max-width: 100%;
        height: 85vh;
        height: 85dvh;
        margin: 0;
        padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
        bottom: 0;
        transform: translateY(105%);
        transition: transform .25s, opacity .25s, visibility .25s;
        overscroll-behavior: contain;
        z-index: 10000000;
    }
    .inner-page .sec-search-products .sidebar-filter.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .inner-page .sidebar-filter .head-filter-resp {
        position: sticky;
        top: -16px;
        z-index: 2;
        background: var(--lightcolor);
        padding: 12px 0;
        margin-bottom: 16px;
    }
    .inner-page.smc-filters-open .overlay-goharnahal {
        z-index: 9999999;
    }
    .inner-page .btn-show-filters {
        bottom: calc(86px + env(safe-area-inset-bottom));
        min-height: 44px;
        max-width: calc(100% - 32px);
    }
    .inner-page .head-resault {
        flex-wrap: wrap;
        gap: 16px;
    }
    .inner-page .head-resault > .form-group,
    .inner-page .head-resault .sortby-box {
        width: 100%;
        max-width: 100%;
    }
    .inner-page .head-resault .input-group {
        width: 100%;
    }
    .inner-page .head-resault .form-control-search {
        width: 0;
        min-width: 0;
        flex: 1;
    }
    .inner-page .tab-contents .head-sticky {
        flex-wrap: wrap;
        gap: 16px;
    }
    .inner-page .tab-contents .head-sticky .list-tabs {
        max-width: 100%;
        overflow-x: auto;
    }
    .inner-page .group-description {
        padding: 20px;
    }
    .inner-page .cart-details {
        margin-top: 24px;
    }
    .inner-page .box-cart-seller {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inner-page .sidebar-filter,
    .inner-page .box-product-gohar .image > img {
        transition: none;
    }
}

.inner-page .favorite-posts .posts-list > div {
    display: flex;
    margin-bottom: 24px;
}
.inner-page .favorite-posts .item {
    position: relative;
    width: 100%;
    padding: 24px;
    border-radius: 20px;
    background: var(--whitecolor);
    text-align: center;
}
.inner-page .favorite-posts img {
    max-width: 100%;
    height: auto;
}
.inner-page .favorite-posts .title {
    line-height: 1.9;
    margin: 16px 0;
}

/* Product feedback uses the same soft cards and green actions as Sam. */
.inner-page .product-cart-notice {
    position: fixed;
    z-index: 1050;
    inset-inline-end: 32px;
    bottom: 32px;
    width: min(400px, calc(100% - 32px));
    padding: 22px;
    border: 1px solid rgba(0, 0, 0, .05);
    border-radius: 24px;
    background: var(--whitecolor);
    color: var(--blackcolor, #45474b);
    box-shadow: 0 12px 48px rgba(30, 65, 54, .14);
    text-align: start;
    direction: rtl;
    animation: smc-cart-notice-in .22s ease-out;
}
.inner-page .product-cart-notice[hidden] {
    display: none;
}
.inner-page .product-cart-notice-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}
.inner-page .product-cart-notice-check {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--lightcolor, #f4f7f7);
    color: var(--maincolor);
}
.inner-page .product-cart-notice-heading p {
    flex: 1;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
}
.inner-page .product-cart-notice-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #858c95;
    cursor: pointer;
}
.inner-page .product-cart-notice-close:hover {
    background: var(--lightcolor, #f4f7f7);
    color: var(--maincolor);
}
.inner-page .product-cart-notice-product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    padding: 14px 0;
    border-block: 1px solid rgba(0, 0, 0, .06);
}
.inner-page .product-cart-notice-product img {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 14px;
    background: var(--lightcolor, #f4f7f7);
}
.inner-page .product-cart-notice-product span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.9;
}
.inner-page .product-cart-notice-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.inner-page .product-cart-notice-actions > * {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.8;
    cursor: pointer;
    text-decoration: none;
}
.inner-page .product-cart-notice-actions > a {
    flex: 1;
    background: var(--maincolor);
    color: var(--whitecolor);
}
.inner-page .product-cart-notice-actions > a:hover {
    filter: brightness(.94);
}
.inner-page .product-cart-notice-actions > button {
    background: transparent;
    color: var(--maincolor);
}
.inner-page .product-cart-notice-actions > button:hover {
    background: var(--lightcolor, #f4f7f7);
}
.inner-page .product-cart-notice :is(a, button):focus-visible {
    outline: 2px solid var(--maincolor);
    outline-offset: 3px;
}
@keyframes smc-cart-notice-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 767px) {
    .inner-page .product-cart-notice {
        inset-inline: 16px;
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        margin-inline: auto;
        padding: 18px;
        border-radius: 22px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .inner-page .product-cart-notice {
        animation: none;
    }
}

/* Product share card */
.inner-page .product-share-modal {
    z-index: 10000001;
}
body.inner-page:has(.product-share-modal[aria-modal="true"]) > .modal-backdrop {
    z-index: 10000000;
}
.inner-page .product-share-modal .modal-dialog {
    max-width: 480px;
    margin-inline: auto;
    padding-inline: 16px;
}
.inner-page .product-share-modal .modal-content {
    border: 0;
    border-radius: 28px;
    padding: 26px;
    color: var(--blackcolor);
    box-shadow: 0 20px 80px rgba(30, 65, 54, .16);
}
.inner-page .product-share-modal .modal-header {
    padding: 0;
    border: 0;
}
.inner-page .product-share-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}
.inner-page .product-share-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 16px;
    color: var(--maincolor);
    background: var(--lightcolor);
}
.inner-page .product-share-modal .modal-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;
}
.inner-page .product-share-modal .btn-close {
    flex-shrink: 0;
    padding: 10px;
    border-radius: 50%;
    background-size: 12px;
}
.inner-page .product-share-modal .modal-body {
    padding: 0;
    min-width: 0;
}
.inner-page #product-share-hint {
    margin: 16px 0 20px;
    font-size: 13px;
    line-height: 1.9;
}
.inner-page .product-share-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 24px;
    background: var(--lightcolor);
    border-radius: 20px;
}
.inner-page .product-share-preview img {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: contain;
    border-radius: 14px;
    background: var(--whitecolor);
}
.inner-page .product-share-preview span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.9;
    font-weight: 500;
}
.inner-page .product-share-modal label {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
}
.inner-page .product-share-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid #e5ebe8;
    border-radius: 18px;
    background: var(--lightcolor);
}
.inner-page #product-share-url {
    min-width: 0;
    width: 100%;
    flex: 1;
    padding: 10px 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--blackcolor);
    font-family: inherit;
    font-size: 13px;
    text-align: left;
}
.inner-page .product-share-modal .btn-copy-product-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 13px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.inner-page .product-share-modal .btn-copy-product-link:hover {
    background: var(--subcolor);
    color: var(--whitecolor);
}
.inner-page .product-share-modal :is(button, input):focus-visible {
    outline: 2px solid var(--maincolor);
    outline-offset: 3px;
    box-shadow: none;
}
.inner-page .product-share-status {
    margin: 10px 0 0;
    min-height: 24px;
    font-size: 12px;
    line-height: 2;
    color: var(--maincolor);
}
.inner-page .product-share-status.is-error {
    color: var(--redcolor);
}
@media (max-width: 575px) {
    .inner-page .product-share-modal .modal-content {
        padding: 22px 18px 14px;
        border-radius: 24px;
    }
    .inner-page .product-share-modal .modal-title {
        font-size: 14px;
    }
    .inner-page .product-share-modal .btn-copy-product-link {
        padding-inline: 12px;
    }
}
