.page-product {
    padding-bottom: 40px;
}

.page-product > .shell {
    width: min(calc(100% - 72px), 1680px);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: start;
    overflow: hidden;
    border: 1px solid rgba(217, 231, 243, 0.94);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.product-gallery-card,
.product-info-card,
.product-company-panel {
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.product-gallery-card {
    width: min(100%, 980px);
    justify-self: center;
    padding: 28px;
}

.product-gallery-view {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.product-gallery-frame {
    display: grid;
    flex: 0 0 100%;
    place-items: center;
    min-width: 0;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid rgba(217, 231, 243, 0.86);
    border-radius: var(--radius-lg);
    background: #ffffff;
    scroll-snap-align: start;
}

.product-gallery-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-gallery-fallback {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(217, 231, 243, 0.86);
    border-radius: var(--radius-lg);
    background: #f7fbff;
    color: var(--color-primary);
    font-size: 28px;
    font-weight: 800;
}

.product-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 96px));
    gap: 10px;
    margin-top: 14px;
}

.product-gallery-thumbs span {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid rgba(217, 231, 243, 0.94);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.product-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    min-width: 0;
    padding: 28px;
    border-bottom: 1px solid rgba(217, 231, 243, 0.94);
}

.product-info-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(217, 231, 243, 0.94);
}

.product-info-card__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    min-width: 0;
}

.product-category-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 30px;
    padding: 0 12px;
    overflow: hidden;
    border: 1px solid rgba(217, 231, 243, 0.96);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: #365a7d;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-info-card h1 {
    flex: 1 1 320px;
    min-width: 0;
    margin: 0;
    color: var(--color-text);
    font-size: 38px;
    line-height: 1.22;
    font-weight: 800;
    word-break: break-word;
}

.product-price-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(217, 231, 243, 0.94);
}

.product-price-line strong {
    color: var(--color-primary);
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
}

.product-price-line span {
    color: var(--color-text-muted);
    font-size: 16px;
    font-weight: 700;
}

.product-attr-block {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(217, 231, 243, 0.92);
    border-radius: var(--radius-md);
    background: #f7fbff;
}

.product-attr-block span,
.product-meta-grid dt {
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: 700;
}

.product-attr-block p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.7;
    word-break: break-word;
}

.product-meta-grid {
    display: grid;
    gap: 10px;
    margin: 0;
}

.product-meta-grid div {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(217, 231, 243, 0.72);
}

.product-meta-grid div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.product-meta-grid dd {
    margin: 0;
    color: var(--color-text);
    font-weight: 700;
    word-break: break-word;
}

.product-company-panel {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #e5f2ff;
}

.product-company-panel__head {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    min-height: 180px;
    padding: 28px 38px;
}

.product-company-panel__logo,
.product-company-panel__logo img,
.product-company-panel__fallback {
    width: 112px;
    height: 112px;
    border-radius: 20px;
}

.product-company-panel__logo {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #ffffff;
    text-decoration: none;
}

.product-company-panel__logo img {
    object-fit: contain;
}

.product-company-panel__fallback {
    display: grid;
    place-items: center;
    color: var(--color-primary);
    font-size: 34px;
    font-weight: 800;
}

.product-company-panel__copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.product-company-panel__name {
    display: block;
    min-width: 0;
    color: var(--color-primary);
    text-decoration: none;
}

.product-company-panel__name strong {
    display: block;
    overflow: hidden;
    font-size: 26px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-company-panel__business {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 20px;
    line-height: 1.55;
    word-break: break-word;
}

.product-company-panel__phone {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 20px;
    line-height: 1.45;
}

.product-company-panel__phone .company-contact-action {
    align-items: baseline;
    width: auto;
    font-size: inherit;
    line-height: inherit;
}

.product-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 28px;
}

.product-content-grid--split {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: start;
}

.product-content-grid + .shell,
.product-detail-layout + .shell,
.product-related {
    margin-top: 32px;
}

.page-product .section-heading h2 {
    font-size: 28px;
}

.rich-content {
    color: var(--color-text-muted);
    line-height: 1.9;
}

.rich-content > :first-child {
    margin-top: 0;
}

.rich-content > :last-child {
    margin-bottom: 0;
}

.rich-content img {
    width: auto;
    max-width: min(100%, 760px);
    display: block;
    height: auto;
    margin: 18px auto;
    border-radius: var(--radius-md);
}

.product-detail-images {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.product-detail-images:first-child {
    margin-top: 0;
}

.product-detail-images img {
    width: auto;
    max-width: min(100%, 760px);
    height: auto;
    margin: 0 auto;
    border: 1px solid rgba(217, 231, 243, 0.86);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.sku-list {
    display: grid;
    gap: 12px;
}

.sku-row {
    padding: 14px 0;
    border-bottom: 1px solid rgba(217, 231, 243, 0.82);
}

.sku-row:first-child {
    padding-top: 0;
}

.sku-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sku-row strong {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
}

.sku-row span {
    display: inline-flex;
    margin-right: 12px;
    color: var(--color-primary);
    font-weight: 800;
}

.sku-row p {
    margin: 10px 0 0;
    color: var(--color-text-muted);
    line-height: 1.7;
}

@media (max-width: 1180px) {
    .product-content-grid--split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .page-product > .shell {
        width: min(calc(100% - 48px), var(--shell-width));
    }

    .product-info-stack {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-product > .shell {
        width: min(calc(100% - 24px), var(--shell-width));
    }

    .page-product .breadcrumb {
        min-width: 0;
        overflow: hidden;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .page-product .breadcrumb a,
    .page-product .breadcrumb strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-product .breadcrumb > span {
        flex: 0 0 auto;
    }

    .product-gallery-card {
        padding: 16px;
    }

    .product-info-stack {
        padding: 16px;
    }

    .product-info-card {
        padding-bottom: 18px;
    }

    .product-info-card h1 {
        font-size: 26px;
    }

    .product-price-line strong {
        font-size: 28px;
    }

    .product-company-panel__head {
        grid-template-columns: 72px minmax(0, 1fr);
        min-height: 0;
        padding: 16px;
    }

    .product-company-panel__logo,
    .product-company-panel__logo img,
    .product-company-panel__fallback {
        width: 72px;
        height: 72px;
    }

    .product-company-panel__name strong {
        font-size: 19px;
    }

    .product-company-panel__business,
    .product-company-panel__phone {
        font-size: 16px;
    }

    .product-gallery-thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .content-panel {
        padding: 18px;
    }

    .page-product .section-heading h2 {
        font-size: 24px;
    }
}
