/* Product-card tool — form fields + gallery (card shell in tool-form.css) */

.mk-tool-pc {
  max-width: 720px;
}

.mk-tool-pc__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.mk-tool-pc__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 148px;
  padding: 1.5rem 1.25rem;
  border: 1.5px dashed rgba(34, 51, 130, 0.28);
  border-radius: 16px;
  background: #fbfbfd;
  color: var(--mk-royal, #223382);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  position: relative;
}

.mk-tool-pc__drop:hover,
.mk-tool-pc__drop.is-drag {
  border-color: #b8612f;
  background: rgba(184, 97, 47, 0.06);
  box-shadow: 0 0 0 3px rgba(184, 97, 47, 0.12);
}

.mk-tool-pc__drop-title {
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
}

.mk-tool-pc__drop-hint {
  font-size: 0.9rem;
  color: var(--mk-muted, #5c6480);
  text-align: center;
  word-break: break-all;
}

.mk-tool-pc__drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mk-tool-pc__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mk-tool-pc__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mk-royal, #223382);
}

.mk-tool-pc__input,
.mk-tool-pc__select,
.mk-tool-pc__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--mk-border, rgba(34, 51, 130, 0.16));
  border-radius: 12px;
  background: #fff;
  color: #1c1c24;
  font: inherit;
  font-size: 1rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.mk-tool-pc__input:focus,
.mk-tool-pc__select:focus,
.mk-tool-pc__textarea:focus {
  outline: none;
  border-color: #b8612f;
  box-shadow: 0 0 0 3px rgba(184, 97, 47, 0.14);
}

.mk-tool-pc__textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

.mk-tool-pc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mk-tool-pc__status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--mk-muted, #5c6480);
}

.mk-tool-pc__status.is-busy {
  color: var(--mk-royal, #223382);
}

.mk-tool-pc__status.is-error {
  color: #b42318;
}

.mk-tool-pc__preview {
  margin-top: 1.5rem;
}

.mk-tool-pc__fig {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--mk-border, rgba(34, 51, 130, 0.12));
  border-radius: 14px;
  background: #fff;
  max-width: 420px;
}

.mk-tool-pc__fig figcaption {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mk-muted, #5c6480);
}

.mk-tool-pc__fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f4f1ec;
}

.mk-tool-pc__download-wrap {
  margin-top: 1.25rem;
}

.mk-tool-pc__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .mk-tool-pc__row {
    grid-template-columns: 1fr;
  }
}

.mk-tool-pc__gallery {
  margin-top: 1.75rem;
}

.mk-tool-pc__gallery-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--mk-royal, #223382);
}

.mk-tool-pc__gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.mk-tool-pc__gallery .mk-tool-pc__fig {
  max-width: none;
}

.mk-tool-pc__slide-dl {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mk-royal, #223382);
  text-decoration: underline;
}

.mk-tool-pc__drop--refs {
  margin-top: 0.15rem;
  min-height: 110px;
  border-style: dotted;
  opacity: 0.98;
}

.mk-tool-pc__drop--refs .mk-tool-pc__drop-title {
  font-size: 0.98rem;
  font-weight: 600;
}


.mk-tool-pc__fig-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
}

.mk-tool-pc__fig-open:focus-visible {
  outline: 2px solid var(--mk-terracotta, #B8612F);
  outline-offset: 2px;
}

.mk-tool-pc__fig-open img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f4f1ec;
}

body.mk-tool-pc--lightbox-open {
  overflow: hidden;
}

.mk-tool-pc__lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(12, 18, 40, 0.82);
  backdrop-filter: blur(2px);
}

.mk-tool-pc__lightbox[hidden] {
  display: none !important;
}

.mk-tool-pc__lightbox-fig {
  margin: 0;
  max-width: min(96vw, 920px);
  max-height: 92vh;
  text-align: center;
}

.mk-tool-pc__lightbox-fig img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  background: #111;
}

.mk-tool-pc__lightbox-fig figcaption {
  margin-top: 0.75rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}

.mk-tool-pc__lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.mk-tool-pc__lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.mk-tool-pc__lightbox-prev { left: 0.75rem; }
.mk-tool-pc__lightbox-next { right: 0.75rem; }

@media (max-width: 640px) {
  .mk-tool-pc__lightbox-nav { display: none; }
}
