*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f4f5;
  color: #111;
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  background: #09b1ba;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
.btn-add {
  background: #fff;
  color: #09b1ba;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-add:hover { background: #e0f7f8; }

/* ── Main ── */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.item-count {
  font-size: 13px;
  color: #777;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #aaa;
}
.empty-state svg { margin-bottom: 16px; stroke: #ccc; }
.empty-state p { font-size: 16px; margin-bottom: 4px; }
.empty-sub { font-size: 13px !important; color: #bbb; }

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── Card ── */
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  transition: transform 0.15s;
}
.card:hover { transform: translateY(-2px); }
.card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-img-placeholder {
  color: #ccc;
}
.card-img-placeholder svg { width: 40px; height: 40px; stroke: #ccc; }
.card-body { padding: 12px 14px 14px; }
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.card-title {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  line-height: 1.3;
  flex: 1;
}
.card-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  margin-top: 1px;
}
.card-delete:hover { color: #e24b4a; }
.card-price {
  font-size: 16px;
  font-weight: 700;
  color: #09b1ba;
  margin-bottom: 6px;
}
.card-meta {
  font-size: 11px;
  color: #999;
  margin-bottom: 8px;
}
.card-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-link {
  display: inline-block;
  font-size: 12px;
  color: #09b1ba;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  background: #e0f7f8;
  color: #09b1ba;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  padding: 0;
}
.modal-close:hover { color: #333; }

/* ── Form ── */
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0; }
.field-row .field { margin-bottom: 14px; }
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 5px;
}
.req { color: #e24b4a; }
.hint { font-weight: 400; color: #aaa; }
input[type="text"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #111;
  background: #fff;
  transition: border-color 0.15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #09b1ba;
  box-shadow: 0 0 0 3px rgba(9, 177, 186, 0.12);
}
textarea { resize: vertical; }
.form-error {
  background: #fff0f0;
  color: #c00;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.btn-cancel {
  flex: 1;
  background: #f4f4f5;
  color: #555;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-cancel:hover { background: #e8e8e8; }
.btn-submit {
  flex: 2;
  background: #09b1ba;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-submit:hover { background: #07969e; }

/* ── Responsive ── */
@media (max-width: 500px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

