.product-certificates {
    width: 100%;
    min-width: 0;
    margin-top: 32px;
    color: rgb(53, 29, 29);
}
.certificate-section {
    box-sizing: border-box;
    padding: 28px 30px;
    background: linear-gradient(180deg, #fff 0%, #f9faff 100%);
    border-radius: 16px;
}
.certificate-section + .certificate-section { margin-top: 20px; }
.certificate-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.certificate-heading h2 { font-size: 22px; font-weight: 500; line-height: 1.5; }
.certificate-scroll-controls { display: flex; gap: 8px; }
.certificate-scroll-controls[hidden] { display: none; }
.certificate-scroll-controls button {
    width: 36px; height: 36px; border: 1px solid #dedce0; border-radius: 50%;
    background: #fff; color: #351d1d; font: inherit; font-size: 24px; cursor: pointer;
}
.certificate-scroll-controls button:disabled { opacity: .35; cursor: default; }
.certificate-list {
    display: flex; gap: 32px; overflow-x: auto; overscroll-behavior-x: contain;
    list-style: none; margin: 0; padding: 0 0 12px;
    scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #b9b0b0 #eee;
    -webkit-overflow-scrolling: touch;
}
.certificate-list::-webkit-scrollbar { height: 6px; }
.certificate-list::-webkit-scrollbar-thumb { background: #b9b0b0; border-radius: 4px; }
.certificate-list::-webkit-scrollbar-track { background: #eee; }
.certificate-card { flex: 0 0 calc((100% - 64px) / 3); min-width: 200px; scroll-snap-align: start; }
.certificate-open { display: block; color: inherit; text-decoration: none; cursor: zoom-in; }
.certificate-media { display: flex; align-items: center; justify-content: center; height: 260px; padding: 8px; box-sizing: border-box; }
.certificate-media img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.certificate-name { display: block; margin-top: 16px; text-align: center; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.certificate-image-error { display: none; color: #888; font-size: 14px; }
.certificate-media--error { background: #f1f2f6; border-radius: 8px; }
.certificate-media--error img { display: none; }
.certificate-media--error .certificate-image-error { display: block; }
.certificate-open:focus-visible, .certificate-list:focus-visible, .certificate-scroll-controls button:focus-visible, .certificate-viewer-close:focus-visible { outline: 2px solid #7b5555; outline-offset: 3px; }
.certificate-viewer {
    position: fixed; inset: 0; box-sizing: border-box; margin: 0; padding: 0;
    width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
    border: 0; background: #131313; color: #fff;
}
.certificate-viewer[open] { display: flex; flex-direction: column; }
.certificate-viewer::backdrop { background: rgba(0, 0, 0, .9); }
.certificate-viewer-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
    flex-shrink: 0;
}
.certificate-viewer-header h3 { font-size: 16px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.certificate-viewer-close { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #333; color: #fff; font-size: 32px; cursor: pointer; }
.certificate-viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 24px max(24px, env(safe-area-inset-bottom)); }
.certificate-viewer-image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.certificate-viewer-image[hidden], .certificate-viewer-error[hidden] { display: none; }
.certificate-viewer-error { font-size: 16px; color: #ddd; }
@media (max-width: 1199px) {
    .product-certificates { margin-top: 20px; }
    .certificate-section { padding: 18px 12px; border-radius: 8px; }
    .certificate-section + .certificate-section { margin-top: 12px; }
    .certificate-heading { margin-bottom: 16px; }
    .certificate-heading h2 { font-size: 16px; }
    .certificate-scroll-controls button { width: 32px; height: 32px; font-size: 22px; }
    .certificate-list { gap: 16px; }
    .certificate-card { flex-basis: 145px; min-width: 145px; }
    .certificate-media { height: 185px; padding: 4px; }
    .certificate-name { margin-top: 10px; font-size: 13px; }
    .certificate-viewer-stage { padding-left: 12px; padding-right: 12px; }
}
