.catalog-connected-button {
  border: 1px solid #0d6b55 !important;
  background: #0d765c !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(13, 118, 92, 0.18) !important;
}
.catalog-connected-button:hover { background: #095f4a !important; }

.catalog-connection-modal { width: min(680px, 100%); }
.catalog-connection-state {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 14px;
  border: 1px solid #dedad3;
  border-radius: 8px;
  background: #f8f8f5;
}
.catalog-connection-state .catalog-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #9a5b00;
  box-shadow: 0 0 0 4px rgba(154, 91, 0, 0.11);
}
.catalog-connection-state.is-connected {
  border-color: #abd4ca;
  background: #edf8f5;
}
.catalog-connection-state.is-connected .catalog-dot {
  background: #126d61;
  box-shadow: 0 0 0 4px rgba(18, 109, 97, 0.11);
}
.catalog-connection-state.is-error {
  border-color: #f0bbb6;
  background: #fff4f2;
}
.catalog-connection-state.is-error .catalog-dot {
  background: #b42318;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}
.catalog-connection-state strong { display: block; font-size: 13px; }
.catalog-connection-state p { margin: 3px 0 0; color: #6d7279; font-size: 12px; line-height: 1.45; }
.catalog-connection-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.catalog-reveal-credentials { width: 100%; margin-top: 10px; }

.catalog-page-head { align-items: flex-end; }
.catalog-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d8d3ca;
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}
.catalog-search { margin: 0 !important; }
.catalog-search span { display: block; margin-bottom: 6px; color: #565b62; font-size: 11px; font-weight: 800; }
.catalog-total {
  min-width: 138px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 4px 10px;
}
.catalog-total strong { color: #121316; font-family: "Sora", sans-serif; font-size: 24px; }
.catalog-total span { color: #6d7279; font-size: 11px; }

.catalog-product-list { display: grid; gap: 9px; }
.catalog-product-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid #d8d3ca;
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 7px 20px rgba(28,24,20,0.04);
}
.catalog-product-card.is-inactive { opacity: 0.64; }
.catalog-product-image {
  width: 76px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dedad3;
  border-radius: 7px;
  background: #f0efea;
  color: #8a8e94;
  font-size: 10px;
  font-weight: 800;
}
.catalog-product-image img { width: 100%; height: 100%; object-fit: cover; }
.catalog-product-copy { min-width: 0; }
.catalog-product-copy h3 { margin: 0; font-family: "Sora", sans-serif; font-size: 14px; line-height: 1.3; }
.catalog-product-copy p { margin: 5px 0 0; color: #686d74; font-size: 12px; line-height: 1.45; }
.catalog-product-copy .catalog-product-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.catalog-product-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.catalog-product-meta span {
  padding: 3px 7px;
  border: 1px solid #e0dcd5;
  border-radius: 999px;
  background: #f8f8f5;
  color: #61666d;
  font-size: 10px;
  font-weight: 700;
}
.catalog-product-price { color: #126d61 !important; font-weight: 800; }
.catalog-product-actions { display: flex; gap: 6px; }
.catalog-product-actions button { min-height: 34px !important; padding: 0 10px !important; font-size: 11px; }
.catalog-empty {
  padding: 46px 20px;
  border: 1px dashed #cfcac1;
  border-radius: 8px;
  text-align: center;
  background: rgba(255,255,255,0.45);
}
.catalog-empty strong { display: block; margin-bottom: 6px; font-family: "Sora", sans-serif; }
.catalog-empty p { margin: 0; color: #70757c; font-size: 12px; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.catalog-pagination span { color: #686d74; font-size: 12px; font-weight: 700; }
.catalog-pagination button { min-height: 36px !important; }

.catalog-product-modal { width: min(900px, 100%); }
.catalog-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; }
.catalog-inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.catalog-inline-fields label { margin-top: 14px !important; }
.catalog-photo-field { padding-top: 14px; }
.catalog-photo-preview {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8d3ca;
  border-radius: 8px;
  background: #f1f0eb;
  color: #888d93;
  font-size: 12px;
  font-weight: 700;
}
.catalog-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.catalog-file-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px !important;
  border: 1px solid #cfcbc3;
  border-radius: 8px;
  background: #fff;
  color: #34383d !important;
  cursor: pointer;
}
.catalog-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.catalog-photo-field > p { margin: 7px 0 0; color: #7a7f85; font-size: 10px; text-align: center; }
.catalog-active-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px !important;
  padding: 10px;
  border: 1px solid #dedad3;
  border-radius: 8px;
  background: #f8f8f5;
}
.catalog-active-check input { width: auto !important; min-height: 0 !important; }

.catalog-import-modal { width: min(760px, 100%); }
.catalog-import-guide {
  margin-bottom: 16px;
  padding: 14px;
  border-left: 3px solid #2f6fed;
  background: #f3f6fd;
}
.catalog-import-guide p { margin: 0 0 7px; color: #555b62; font-size: 12px; line-height: 1.55; }
.catalog-import-guide a { color: #17469c; font-size: 12px; font-weight: 800; }
.catalog-dropzone {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  margin: 0 0 12px !important;
  padding: 20px;
  border: 1px dashed #aaa59c;
  border-radius: 8px;
  background: #fafaf7;
  text-align: center;
  cursor: pointer;
}
.catalog-dropzone strong { color: #202225; font-family: "Sora", sans-serif; font-size: 15px; }
.catalog-dropzone span { color: #767b82; font-size: 12px; }
.catalog-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#catalogImportForm > button { width: 100%; }
.catalog-import-report { margin-top: 18px; padding-top: 18px; border-top: 1px solid #dedad3; }
.catalog-report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.catalog-report-kpi { padding: 12px; border: 1px solid #dedad3; border-radius: 8px; background: #f8f8f5; }
.catalog-report-kpi strong { display: block; font-family: "Sora", sans-serif; font-size: 22px; }
.catalog-report-kpi span { color: #6b7077; font-size: 10px; }
.catalog-report-errors { max-height: 220px; margin-top: 12px; overflow-y: auto; }
.catalog-report-error { padding: 9px 0; border-bottom: 1px solid #e4e0d9; color: #5d6269; font-size: 11px; line-height: 1.4; }
.catalog-report-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.catalog-report-actions a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  background: #202225;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.msg.catalog-product-message { max-width: min(320px, 88%); padding: 8px !important; }
.msg.catalog-product-message img { width: 100%; display: block; border-radius: 7px; }
.msg.catalog-product-message strong { display: block; margin: 8px 4px 3px; }
.msg.catalog-product-message span { display: block; margin: 0 4px 4px; color: #51565d; font-size: 12px; }

@media (max-width: 760px) {
  .catalog-page-head { align-items: stretch; }
  .catalog-head-actions, .catalog-connection-actions { flex-direction: column-reverse; align-items: stretch; }
  .catalog-head-actions button, .catalog-connection-actions button { width: 100%; }
  .catalog-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .catalog-total { justify-content: flex-start; padding-bottom: 0; }
  .catalog-product-card { grid-template-columns: 64px minmax(0,1fr); align-items: start; }
  .catalog-product-image { width: 64px; }
  .catalog-product-actions { grid-column: 1 / -1; }
  .catalog-product-actions button { flex: 1; }
  .catalog-form-grid { grid-template-columns: 1fr; }
  .catalog-photo-field { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 10px; align-items: center; }
  .catalog-photo-field > p, .catalog-active-check { grid-column: 2; margin: 0 !important; text-align: left; }
  .catalog-report-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 460px) {
  .catalog-inline-fields { grid-template-columns: 1fr; gap: 0; }
  .catalog-photo-field { grid-template-columns: 96px minmax(0,1fr); }
}
