.product-card .product-art {
  position:relative;
  display:block;
  flex:none;
  width:calc(100% + 36px);
  aspect-ratio:16/9;
  margin:-19px -18px 16px;
  padding:0;
  overflow:hidden;
  border:0;
  border-bottom:1px solid #e3ebf7;
  border-radius:12px 12px 0 0;
  background:#edf3fc;
  color:#1245aa;
  cursor:zoom-in;
}

.product-art .product-art-image {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
}

.product-card .product-art.is-placeholder {
  cursor:default;
}

.product-art-count {
  position:absolute;
  top:8px;
  left:8px;
  padding:3px 7px;
  border-radius:5px;
  background:#fff;
  color:#355981;
  font:600 11px/1.5 system-ui,sans-serif;
}

.product-art-open {
  position:absolute;
  right:8px;
  bottom:8px;
  display:flex;
  align-items:center;
  gap:4px;
  padding:4px 7px;
  border-radius:5px;
  background:#fff;
  color:#1245aa;
  font:600 10px/1.5 system-ui,sans-serif;
}

.product-art-open svg {
  width:15px;
  height:15px;
}

.product-art:hover .product-art-open {
  background:#1458f5;
  color:#fff;
}

.product-art:focus-visible {
  outline:3px solid #1458f5;
  outline-offset:3px;
  z-index:1;
}

.product-card h4 {
  margin:0 0 8px;
  padding:0;
  border:0;
  min-height:52px;
  overflow-wrap:anywhere;
}

.product-card .product-type {
  display:block;
  min-height:20px;
  margin:0 0 10px;
  text-align:center;
  color:#526582;
  overflow-wrap:anywhere;
}

.product-card .product-pricing {
  margin-top:auto;
  min-height:74px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.product-card .discount-badge {
  position:static;
  align-self:center;
  margin:-4px 0 8px;
  max-width:100%;
}

.product-card:has(.discount-badge) .product-type {
  padding-right:0;
}

.product-card .product-original {
  min-height:18px;
}

.product-gallery-dialog {
  box-sizing:border-box;
  width:min(1200px,calc(100vw - 32px));
  height:min(860px,calc(100dvh - 32px));
  max-width:none;
  max-height:none;
  margin:auto;
  padding:0;
  border:0;
  border-radius:14px;
  background:#fff;
  color:#0b1a3b;
  box-shadow:0 16px 60px #0b1a3b55;
  overflow:hidden;
  color-scheme:light;
}

.product-gallery-dialog::backdrop {
  background:#0b1a3bd9;
}

.product-gallery-shell {
  height:100%;
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr) auto;
  min-width:0;
}

.product-gallery-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  border-bottom:1px solid #dce6f5;
  background:#fff;
  z-index:2;
}

.product-gallery-title {
  min-width:0;
  max-height:3em;
  overflow:auto;
  overflow-wrap:anywhere;
  font-size:18px;
  line-height:1.5;
  margin:0;
  color:#0b1a3b;
}

.product-gallery-dialog button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
  min-width:44px;
  min-height:44px;
  padding:9px;
  border:1px solid #cbdcf6;
  border-radius:8px;
  background:#fff;
  color:#1245aa;
  font:600 13px/1.4 system-ui,sans-serif;
  cursor:pointer;
}

.product-gallery-dialog button svg {
  width:21px;
  height:21px;
}

.product-gallery-dialog button:hover:not(:disabled) {
  border-color:#1458f5;
  background:#edf4ff;
}

.product-gallery-dialog button:disabled {
  opacity:.4;
  cursor:default;
}

.product-gallery-dialog :focus-visible {
  outline:3px solid #1458f5;
  outline-offset:2px;
}

.product-gallery-dialog ::selection {
  background:#d6e5ff;
  color:#0b1a3b;
}

.product-gallery-dialog .product-gallery-close {
  border:0;
  background:#edf3fc;
  color:#0b1a3b;
}

.product-gallery-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 18px;
  background:#f3f7fd;
  border-bottom:1px solid #dce6f5;
}

.product-gallery-navigation,.product-gallery-zoom {
  display:flex;
  align-items:center;
  gap:8px;
}

.product-gallery-count {
  min-width:50px;
  text-align:center;
  font-size:13px;
  font-variant-numeric:tabular-nums;
  color:#355981;
}

.product-gallery-percentage {
  min-width:45px;
  text-align:center;
  font-size:12px;
  font-variant-numeric:tabular-nums;
  color:#355981;
}

.product-gallery-stage {
  position:relative;
  min-height:0;
  overflow:hidden;
  touch-action:none;
  user-select:none;
  background:#eaf0f9;
  cursor:default;
}

.product-gallery-stage.is-zoomed {
  cursor:grab;
}

.product-gallery-stage.is-zoomed:active {
  cursor:grabbing;
}

.product-gallery-full {
  position:absolute;
  left:50%;
  top:50%;
  display:block;
  max-width:none;
  max-height:none;
  object-fit:contain;
  transform-origin:center;
  will-change:transform;
  user-select:none;
  -webkit-user-drag:none;
}

.product-gallery-full[hidden],.product-gallery-status[hidden],.product-gallery-retry[hidden] {
  display:none;
}

.product-gallery-status {
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:12px;
  padding:24px;
  text-align:center;
  color:#355981;
  font-size:14px;
  line-height:1.7;
}

.product-gallery-status p {
  margin:0;
  max-width:36ch;
}

.product-gallery-hint {
  margin:0;
  padding:10px 18px;
  background:#fff;
  color:#526582;
  font-size:12px;
  line-height:1.6;
  text-align:center;
}

@media(max-width:700px) {
  .product-card .product-art {
    width:calc(100% + 20px);
    margin:-15px -10px 12px;
    border-radius:10px 10px 0 0;
  }
  .product-art-count {
    top:6px;
    left:6px;
    font-size:10px;
    padding:2px 6px;
  }
  .product-art-open {
    right:5px;
    bottom:5px;
    font-size:9px;
    padding:3px 5px;
  }
  .product-art-open svg {
    width:13px;
    height:13px;
  }
  .product-card h4 {
    min-height:45px;
    margin:0 0 6px;
    font-size:14px;
  }
  .product-card .product-type {
    font-size:11px;
    line-height:1.5;
    min-height:17px;
    margin-bottom:8px;
  }
  .product-card .product-pricing {
    min-height:70px;
  }
  .product-gallery-dialog {
    width:calc(100vw - 16px);
    height:calc(100dvh - 16px);
    border-radius:12px;
  }
  .product-gallery-header {
    gap:10px;
    padding:10px 12px;
  }
  .product-gallery-title {
    font-size:15px;
  }
  .product-gallery-toolbar {
    padding:7px 10px;
    gap:6px;
    flex-wrap:wrap;
  }
  .product-gallery-navigation,.product-gallery-zoom {
    gap:4px;
  }
  .product-gallery-count {
    min-width:40px;
    font-size:12px;
  }
  .product-gallery-percentage {
    min-width:36px;
    font-size:11px;
  }
  .product-gallery-hint {
    font-size:11px;
    padding:8px 12px;
    padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));
  }
}

@media(max-width:350px) {
  .product-grid {
    grid-template-columns:minmax(0,1fr);
  }
  .product-card h4 {
    min-height:0;
    font-size:16px;
  }
  .product-gallery-toolbar {
    justify-content:center;
  }
}
