.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%, 820px);
    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 min(100%, 760px);
    place-items: center;
    width: min(100%, 760px);
    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: auto;
    height: auto;
    max-width: 100%;
    max-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: 88px minmax(0, 1fr);
    gap: 16px 20px;
    align-items: start;
    min-height: 0;
    padding: 20px 28px;
}

.product-company-panel__logo,
.product-company-panel__logo img,
.product-company-panel__fallback {
    width: 88px;
    height: 88px;
    border-radius: 16px;
}

.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: 28px;
    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: 18px;
    line-height: 1.55;
    word-break: break-word;
}

.product-company-panel__phone {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 18px;
    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: min(100%, 960px);
    max-width: 100%;
    max-height: none;
    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: min(100%, 960px);
    max-width: 100%;
    max-height: none;
    height: auto;
    margin: 0 auto;
    border: 1px solid rgba(217, 231, 243, 0.86);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.product-gallery-frame[data-product-image-trigger],
.product-gallery-thumb,
.product-detail-images img,
.rich-content img {
    cursor: zoom-in;
}

.product-gallery-frame[data-product-image-trigger]:focus-visible,
.product-gallery-thumb:focus-visible,
.product-detail-images img[data-product-image-trigger]:focus-visible,
.rich-content img[data-product-image-trigger]:focus-visible {
    outline: 3px solid rgba(38, 119, 245, 0.42);
    outline-offset: 3px;
}

.product-gallery-thumb {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(217, 231, 243, 0.94);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: inherit;
}

.product-image-preview[hidden] {
    display: none;
}

.product-image-preview {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 18, 32, 0.9);
}

.product-image-preview__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.product-image-preview__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(100%, 1280px);
    height: min(100%, 900px);
    max-height: 100%;
    pointer-events: none;
}

.product-image-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    pointer-events: auto;
}

.product-image-preview__count {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.product-image-preview__head-actions,
.product-image-preview__toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-image-preview__close,
.product-image-preview__nav,
.product-image-preview__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
    pointer-events: auto;
}

.product-image-preview__close {
    width: 38px;
    height: 38px;
}

.product-image-preview__nav,
.product-image-preview__action {
    width: 44px;
    height: 44px;
}

.product-image-preview__action {
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.product-image-preview__action--reset {
    width: auto;
    min-width: 68px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.product-image-preview__close:hover,
.product-image-preview__close:focus-visible,
.product-image-preview__nav:hover,
.product-image-preview__nav:focus-visible,
.product-image-preview__action:hover,
.product-image-preview__action:focus-visible {
    border-color: rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.24);
}

.product-image-preview__action:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.product-image-preview__close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.product-image-preview__nav svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.product-image-preview__stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    overflow: hidden;
    pointer-events: auto;
}

.product-image-preview__image {
    display: block;
    width: auto;
    max-width: calc(100% - 112px);
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #ffffff;
    cursor: zoom-in;
    transform: scale(var(--product-image-preview-scale, 1));
    transform-origin: center center;
    transition: transform 0.18s ease;
    will-change: transform;
}

.product-image-preview__image.is-zoomed {
    cursor: zoom-out;
}

.product-image-preview__nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
}

.product-image-preview__nav[hidden] {
    display: none;
}

.product-image-preview__nav--previous {
    left: 10px;
}

.product-image-preview__nav--next {
    right: 10px;
}

body.product-image-preview-open {
    overflow: hidden;
}

.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;
    }

    .product-image-preview {
        padding: 10px;
    }

    .product-image-preview__dialog {
        width: 100%;
        height: 100%;
    }

    .product-image-preview__head-actions,
    .product-image-preview__toolbar {
        gap: 6px;
    }

    .product-image-preview__image {
        max-width: calc(100% - 72px);
    }

    .product-image-preview__nav,
    .product-image-preview__action {
        width: 36px;
        height: 36px;
    }

    .product-image-preview__action {
        font-size: 16px;
    }

    .product-image-preview__action--reset {
        min-width: 58px;
        padding: 0 10px;
        font-size: 12px;
    }

    .product-image-preview__nav--previous {
        left: 2px;
    }

    .product-image-preview__nav--next {
        right: 2px;
    }
}
